mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fix bug #80184
This commit is contained in:
parent
4982964224
commit
6ea870f5fb
3 changed files with 25 additions and 0 deletions
4
NEWS
4
NEWS
|
@ -6,6 +6,10 @@ PHP NEWS
|
||||||
. Fixed bug #80121 (Null pointer deref if CurlHandle directly instantiated).
|
. Fixed bug #80121 (Null pointer deref if CurlHandle directly instantiated).
|
||||||
(Nikita)
|
(Nikita)
|
||||||
|
|
||||||
|
- Opcache:
|
||||||
|
. Fixed bug #80184 (Complex expression in while / if statements resolves to
|
||||||
|
false incorrectly). (Nikita)
|
||||||
|
|
||||||
- SPL:
|
- SPL:
|
||||||
. Fixed bug #65387 (Circular references in SPL iterators are not garbage
|
. Fixed bug #65387 (Circular references in SPL iterators are not garbage
|
||||||
collected). (Nikita)
|
collected). (Nikita)
|
||||||
|
|
20
Zend/tests/bug80184.phpt
Normal file
20
Zend/tests/bug80184.phpt
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #80184: Complex expression in while / if statements resolves to false incorrectly
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$callbacks = [
|
||||||
|
function () { echo "First item!\n"; },
|
||||||
|
function () { echo "Second item!\n"; },
|
||||||
|
function () { echo "Third item!\n"; },
|
||||||
|
function () { echo "Fourth item!\n"; },
|
||||||
|
];
|
||||||
|
|
||||||
|
while ($callback = array_shift($callbacks) and ($callback() || true));
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
First item!
|
||||||
|
Second item!
|
||||||
|
Third item!
|
||||||
|
Fourth item!
|
|
@ -1371,6 +1371,7 @@ static void zend_jmp_optimization(zend_basic_block *block, zend_op_array *op_arr
|
||||||
MAKE_NOP(last_op);
|
MAKE_NOP(last_op);
|
||||||
block->len--;
|
block->len--;
|
||||||
}
|
}
|
||||||
|
block->successors[0] = follow_block - cfg->blocks;
|
||||||
block->successors_count = 1;
|
block->successors_count = 1;
|
||||||
++(*opt_count);
|
++(*opt_count);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue