Skip to content

Commit 965ff1c

Browse files
committed
Merge branch 'master' of git.php.net:php-src
2 parents d9f321c + 359af7c commit 965ff1c

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Crash when using dynamic call syntax with fully qualified name in a namespace
3+
--FILE--
4+
<?php
5+
6+
namespace Foo;
7+
try {
8+
('\bar')();
9+
} catch (\Error $e) {
10+
echo $e->getMessage(), "\n";
11+
}
12+
13+
?>
14+
--EXPECT--
15+
Call to undefined function bar()

Zend/zend_compile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ zend_string *zend_resolve_non_class_name(
871871

872872
if (ZSTR_VAL(name)[0] == '\\') {
873873
/* Remove \ prefix (only relevant if this is a string rather than a label) */
874+
*is_fully_qualified = 1;
874875
return zend_string_init(ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1, 0);
875876
}
876877

ext/posix/posix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ int php_posix_group_to_array(struct group *g, zval *array_group) /* {{{ */
987987
array_init(&array_members);
988988

989989
add_assoc_string(array_group, "name", g->gr_name);
990-
if (array_group->gr_passwd) {
990+
if (g->gr_passwd) {
991991
add_assoc_string(array_group, "passwd", g->gr_passwd);
992992
} else {
993993
add_assoc_null(array_group, "passwd");

0 commit comments

Comments
 (0)