mirror of
https://github.com/php/php-src.git
synced 2026-04-29 03:03:26 +02:00
Fixed bug #70240 (Segfault when doing unset($var());)
This commit is contained in:
@@ -3,6 +3,7 @@ PHP NEWS
|
||||
20 Aug 2015, PHP 7.0.0 RC 1
|
||||
|
||||
- Core:
|
||||
. Fixed bug #70240 (Segfault when doing unset($var());). (Laruence)
|
||||
. Fixed bug #70223 (Incrementing value returned by magic getter). (Laruence)
|
||||
. Fixed bug #70215 (Segfault when __invoke is static). (Bob)
|
||||
. Fixed bug #70207 (Finally is broken with opcache). (Laruence, Dmitry)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
Bug #70240 (Segfault when doing unset($var()))
|
||||
--FILE--
|
||||
<?php
|
||||
unset($var());
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Can't use function return value in write context in %sbug70240.php on line %d
|
||||
+3
-1
@@ -3428,9 +3428,11 @@ void zend_compile_static_var(zend_ast *ast) /* {{{ */
|
||||
void zend_compile_unset(zend_ast *ast) /* {{{ */
|
||||
{
|
||||
zend_ast *var_ast = ast->child[0];
|
||||
|
||||
znode var_node;
|
||||
zend_op *opline;
|
||||
|
||||
zend_ensure_writable_variable(var_ast);
|
||||
|
||||
switch (var_ast->kind) {
|
||||
case ZEND_AST_VAR:
|
||||
if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user