-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-8.3: Fix GH-16908: _ZendTestMagicCallForward does not handle references well
- Loading branch information
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
GH-16908 (_ZendTestMagicCallForward does not handle references well) | ||
--EXTENSIONS-- | ||
zend_test | ||
--FILE-- | ||
<?php | ||
$cls = new _ZendTestMagicCallForward(); | ||
function &foo() { | ||
} | ||
$cls->foo()->x ??= 42; | ||
?> | ||
--EXPECTF-- | ||
Notice: Only variable references should be returned by reference in %s on line %d | ||
|
||
Notice: Only variable references should be returned by reference in %s on line %d | ||
|
||
Fatal error: Uncaught Error: Attempt to assign property "x" on null in %s:%d | ||
Stack trace: | ||
#0 {main} | ||
thrown in %s on line %d |