diff options
author | Felipe Pena <felipe@php.net> | 2010-03-03 00:15:34 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2010-03-03 00:15:34 +0000 |
commit | c302509726a11d5f79cf04b97a4f2a57bed8a10c (patch) | |
tree | b7992a6407f7dc3ec23e9ed8c3da3a0cc2773a3e | |
parent | 004a72ce1a989f9dd3211ae2faa31087b44d9673 (diff) | |
download | php-git-c302509726a11d5f79cf04b97a4f2a57bed8a10c.tar.gz |
- Fixed bug #50731 (Inconsistent namespaces sent to functions registered with spl_autoload_register)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | Zend/tests/bug46665.phpt | 2 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 6 |
3 files changed, 8 insertions, 2 deletions
@@ -96,6 +96,8 @@ PHP NEWS (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) diff --git a/Zend/tests/bug46665.phpt b/Zend/tests/bug46665.phpt index 8e7fc086dd..1f82454387 100644 --- a/Zend/tests/bug46665.phpt +++ b/Zend/tests/bug46665.phpt @@ -12,4 +12,4 @@ function __autoload($class) { ?> --EXPECTF-- -%string|unicode%(12) "\Foo\Bar\Baz" +%string|unicode%(11) "Foo\Bar\Baz" diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index f73df65e2a..55d0ab72ca 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1076,7 +1076,11 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut 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; |