felipe Wed, 03 Mar 2010 00:15:34 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=295763
Log: - Fixed bug #50731 (Inconsistent namespaces sent to functions registered with spl_autoload_register) Bug: http://bugs.php.net/50731 (Open) Inconsistent namespaces sent to functions registered with spl_autoload_register Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/Zend/tests/bug46665.phpt U php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c U php/php-src/trunk/Zend/tests/bug46665.phpt U php/php-src/trunk/Zend/zend_execute_API.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2010-03-02 23:27:25 UTC (rev 295762) +++ php/php-src/branches/PHP_5_3/NEWS 2010-03-03 00:15:34 UTC (rev 295763) @@ -96,6 +96,8 @@ (hiroaki dot kawai at gmail dot com, Ilia) - Fixed bug #50756 (CURLOPT_FTP_SKIP_PASV_IP does not exist). (Sriram) - Fixed bug #50732 (exec() adds single byte twice to $output array). (Ilia) +- Fixed bug #50731 (Inconsistent namespaces sent to functions registered with + spl_autoload_register). (Felipe) - Fixed bug #50728 (All PDOExceptions hardcode 'code' property to 0). (Joey, Ilia) - Fixed bug #50723 (Bug in garbage collector causes crash). (Dmitry) Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug46665.phpt =================================================================== --- php/php-src/branches/PHP_5_3/Zend/tests/bug46665.phpt 2010-03-02 23:27:25 UTC (rev 295762) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug46665.phpt 2010-03-03 00:15:34 UTC (rev 295763) @@ -12,4 +12,4 @@ ?> --EXPECTF-- -%string|unicode%(12) "\Foo\Bar\Baz" +%string|unicode%(11) "Foo\Bar\Baz" Modified: php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c =================================================================== --- php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c 2010-03-02 23:27:25 UTC (rev 295762) +++ php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c 2010-03-03 00:15:34 UTC (rev 295763) @@ -1076,7 +1076,11 @@ ALLOC_ZVAL(class_name_ptr); INIT_PZVAL(class_name_ptr); - ZVAL_STRINGL(class_name_ptr, name, name_length, 1); + if (name[0] == '\\') { + ZVAL_STRINGL(class_name_ptr, name+1, name_length-1, 1); + } else { + ZVAL_STRINGL(class_name_ptr, name, name_length, 1); + } args[0] = &class_name_ptr; Modified: php/php-src/trunk/Zend/tests/bug46665.phpt =================================================================== --- php/php-src/trunk/Zend/tests/bug46665.phpt 2010-03-02 23:27:25 UTC (rev 295762) +++ php/php-src/trunk/Zend/tests/bug46665.phpt 2010-03-03 00:15:34 UTC (rev 295763) @@ -12,4 +12,4 @@ ?> --EXPECTF-- -%string|unicode%(12) "\Foo\Bar\Baz" +%string|unicode%(11) "Foo\Bar\Baz" Modified: php/php-src/trunk/Zend/zend_execute_API.c =================================================================== --- php/php-src/trunk/Zend/zend_execute_API.c 2010-03-02 23:27:25 UTC (rev 295762) +++ php/php-src/trunk/Zend/zend_execute_API.c 2010-03-03 00:15:34 UTC (rev 295763) @@ -1070,7 +1070,7 @@ zval *retval_ptr = NULL; int retval; unsigned int lc_name_len; - zstr lc_name, lc_free; + zstr lc_name, lc_free, name_p; char dummy = 1; zend_fcall_info fcall_info; zend_fcall_info_cache fcall_cache; @@ -1133,7 +1133,15 @@ ALLOC_ZVAL(class_name_ptr); INIT_PZVAL(class_name_ptr); - ZVAL_ZSTRL(class_name_ptr, type, autoload_name, name_length, 1); + name_p.v = autoload_name.v; + if (name_length != lc_name_len) { + if (type == IS_UNICODE) { + name_p.u++; + } else if (type == IS_STRING) { + name_p.s++; + } + } + ZVAL_ZSTRL(class_name_ptr, type, name_p, lc_name_len, 1); args[0] = &class_name_ptr;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php