- 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

2
NEWS
View file

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

View file

@ -12,4 +12,4 @@ function __autoload($class) {
?>
--EXPECTF--
%string|unicode%(12) "\Foo\Bar\Baz"
%string|unicode%(11) "Foo\Bar\Baz"

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;