iliaa Tue Feb 6 00:01:18 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/session php_session.h /php-src NEWS Log: Fixed Bug #40274 (Sessions fail with numeric root keys). http://cvs.php.net/viewvc.cgi/php-src/ext/session/php_session.h?r1=1.101.2.2.2.4&r2=1.101.2.2.2.5&diff_format=u Index: php-src/ext/session/php_session.h diff -u php-src/ext/session/php_session.h:1.101.2.2.2.4 php-src/ext/session/php_session.h:1.101.2.2.2.5 --- php-src/ext/session/php_session.h:1.101.2.2.2.4 Mon Jan 1 09:36:05 2007 +++ php-src/ext/session/php_session.h Tue Feb 6 00:01:18 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_session.h,v 1.101.2.2.2.4 2007/01/01 09:36:05 sebastian Exp $ */ +/* $Id: php_session.h,v 1.101.2.2.2.5 2007/02/06 00:01:18 iliaa Exp $ */ #ifndef PHP_SESSION_H #define PHP_SESSION_H @@ -223,11 +223,16 @@ #define PS_ENCODE_LOOP(code) do { \ HashTable *_ht = Z_ARRVAL_P(PS(http_session_vars)); \ + int key_type; \ \ for (zend_hash_internal_pointer_reset(_ht); \ - zend_hash_get_current_key_ex(_ht, &key, &key_length, &num_key, 0, NULL) == HASH_KEY_IS_STRING; \ + (key_type = zend_hash_get_current_key_ex(_ht, &key, &key_length, &num_key, 0, NULL)) != HASH_KEY_NON_EXISTANT; \ zend_hash_move_forward(_ht)) { \ - key_length--; \ + if (key_type == HASH_KEY_IS_LONG) { \ + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Skipping numeric key %ld.", num_key); \ + continue; \ + } \ + key_length--; \ if (php_get_session_var(key, key_length, &struc TSRMLS_CC) == SUCCESS) { \ code; \ } \ http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.520&r2=1.2027.2.547.2.521&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.520 php-src/NEWS:1.2027.2.547.2.521 --- php-src/NEWS:1.2027.2.547.2.520 Fri Feb 2 15:44:06 2007 +++ php-src/NEWS Tue Feb 6 00:01:18 2007 @@ -103,6 +103,7 @@ missing). (Tony) - Fixed bug #40285 (The PDO prepare parser goes into an infinite loop in some instances). (Ilia) +- Fixed Bug #40274 (Sessions fail with numeric root keys). (Ilia) - Fixed bug #40259 (ob_start call many times - memory error). (Dmitry) - Fixed bug #40231 (file_exists incorrectly reports false). (Dmitry) - Fixed bug #40228 (ZipArchive::extractTo does create empty directories
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php