mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
Merge branch 'PHP-7.0' of git.php.net:php-src into PHP-7.0
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Crash when using dynamic call syntax with fully qualified name in a namespace
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
namespace Foo;
|
||||
try {
|
||||
('\bar')();
|
||||
} catch (\Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Call to undefined function bar()
|
||||
@@ -773,6 +773,7 @@ zend_string *zend_resolve_non_class_name(
|
||||
|
||||
if (ZSTR_VAL(name)[0] == '\\') {
|
||||
/* Remove \ prefix (only relevant if this is a string rather than a label) */
|
||||
*is_fully_qualified = 1;
|
||||
return zend_string_init(ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1, 0);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -987,7 +987,7 @@ int php_posix_group_to_array(struct group *g, zval *array_group) /* {{{ */
|
||||
array_init(&array_members);
|
||||
|
||||
add_assoc_string(array_group, "name", g->gr_name);
|
||||
if (array_group->gr_passwd) {
|
||||
if (g->gr_passwd) {
|
||||
add_assoc_string(array_group, "passwd", g->gr_passwd);
|
||||
} else {
|
||||
add_assoc_null(array_group, "passwd");
|
||||
|
||||
Reference in New Issue
Block a user