Skip to content

Commit b2f605e

Browse files
Merge branch 'php:master' into readline-true
2 parents ee3ea9d + 55e8ebe commit b2f605e

28 files changed

+333
-119
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
/ext/random @TimWolla @zeriyoshi
4646
/ext/session @Girgias
4747
/ext/simplexml @nielsdos
48+
/ext/soap @nielsdos
4849
/ext/sockets @devnexen
4950
/ext/spl @Girgias
5051
/ext/standard @bukka

EXTENSIONS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ SINCE: 5.0
184184
-------------------------------------------------------------------------------
185185
EXTENSION: soap
186186
PRIMARY MAINTAINER: Dmitry Stogov <[email protected]> (2004 - 2018)
187-
MAINTENANCE: Maintained
187+
Niels Dossche <[email protected]> (2024 - 2024)
188+
MAINTENANCE: Odd fixes
188189
STATUS: Working
189190
-------------------------------------------------------------------------------
190191
EXTENSION: xml

Zend/tests/gh16508.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
GH-16508: Missing lineno in inheritance errors of delayed early bound classes
3+
--EXTENSIONS--
4+
opcache
5+
--INI--
6+
opcache.enable_cli=1
7+
--FILE--
8+
<?php
9+
10+
new Test2;
11+
12+
class Test2 extends Test {}
13+
14+
abstract class Test {
15+
abstract function foo();
16+
}
17+
18+
?>
19+
--EXPECTF--
20+
Fatal error: Class Test2 contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Test::foo) in %s on line 5

Zend/tests/gh16509.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
function test() {
4+
5+
6+
echo 'foo';
7+
}

Zend/tests/gh16509.phpt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--TEST--
2+
GH-16509: Incorrect lineno reported for function redeclaration
3+
--FILE--
4+
<?php
5+
6+
include __DIR__ . '/gh16509.inc';
7+
include __DIR__ . '/gh16509.inc';
8+
9+
?>
10+
--EXPECTF--
11+
Fatal error: Cannot redeclare function test() (previously declared in %sgh16509.inc:3) in %sgh16509.inc on line 3

Zend/tests/gh16515.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
GH-16515: Incorrect propagation of ZEND_ACC_RETURN_REFERENCE for call trampoline
3+
--FILE--
4+
<?php
5+
6+
namespace Foo;
7+
8+
class Foo {
9+
public function &__call($method, $args) {}
10+
}
11+
12+
call_user_func((new Foo)->bar(...));
13+
14+
?>
15+
--EXPECTF--
16+
Notice: Only variable references should be returned by reference in %s on line %d

Zend/tests/lazy_objects/init_ast_const.phpt

Lines changed: 0 additions & 27 deletions
This file was deleted.

Zend/tests/lazy_objects/init_ast_const_failure.phpt

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--TEST--
2+
oss-fuzz #71407
3+
--FILE--
4+
<?php
5+
6+
class C {
7+
public $x=x;
8+
}
9+
10+
$reflector = new ReflectionClass(C::class);
11+
12+
try {
13+
$obj = $reflector->newLazyGhost(function() {});
14+
clone $obj;
15+
} catch (Error $e) {
16+
printf("%s: %s\n", $e::class, $e->getMessage());
17+
}
18+
19+
20+
?>
21+
--EXPECT--
22+
Error: Undefined constant "x"

Zend/zend_closures.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ void zend_closure_from_frame(zval *return_value, zend_execute_data *call) { /* {
871871

872872
memset(&trampoline, 0, sizeof(zend_internal_function));
873873
trampoline.type = ZEND_INTERNAL_FUNCTION;
874-
trampoline.fn_flags = mptr->common.fn_flags & (ZEND_ACC_STATIC | ZEND_ACC_VARIADIC);
874+
trampoline.fn_flags = mptr->common.fn_flags & (ZEND_ACC_STATIC | ZEND_ACC_VARIADIC | ZEND_ACC_RETURN_REFERENCE);
875875
trampoline.handler = zend_closure_call_magic;
876876
trampoline.function_name = mptr->common.function_name;
877877
trampoline.scope = mptr->common.scope;

0 commit comments

Comments
 (0)