mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Fixed bug #70240 (Segfault when doing unset($var());)
This commit is contained in:
parent
162bf9e802
commit
4064ee3061
1
NEWS
1
NEWS
@ -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)
|
||||
|
8
Zend/tests/bug70240.phpt
Normal file
8
Zend/tests/bug70240.phpt
Normal file
@ -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
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user