- Fixed bug #50731 (Inconsistent namespaces sent to functions registered with spl_autoload_register)

This commit is contained in:
Felipe Pena 2010-03-03 00:15:34 +00:00
parent 004a72ce1a
commit c302509726
3 changed files with 8 additions and 2 deletions

View file

@ -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;