summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-03-03 00:15:34 (GMT)
committerFelipe Pena <felipe@php.net>2010-03-03 00:15:34 (GMT)
commitc302509726a11d5f79cf04b97a4f2a57bed8a10c (patch)
treeb7992a6407f7dc3ec23e9ed8c3da3a0cc2773a3e /Zend
parent004a72ce1a989f9dd3211ae2faa31087b44d9673 (diff)
downloadphp-c302509726a11d5f79cf04b97a4f2a57bed8a10c.tar.gz
- Fixed bug #50731 (Inconsistent namespaces sent to functions registered with spl_autoload_register)
Diffstat (limited to 'Zend')
-rw-r--r--Zend/tests/bug46665.phpt2
-rw-r--r--Zend/zend_execute_API.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/Zend/tests/bug46665.phpt b/Zend/tests/bug46665.phpt
index 8e7fc08..1f82454 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 f73df65..55d0ab7 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;