php-src/Zend/tests/bug79947.phpt
Nikita Popov 2d087210eb Fixed bug #79947
Move the FREE_OP for op_data out of the zend_binary_assign_op_dim_slow()
slow path, so it can be used by the other error path as well. This
makes ASSIGN_DIM_OP structurally more similar to ASSIGN_DIM.
2020-08-10 10:11:56 +02:00

14 lines
234 B
PHP

--TEST--
Bug #79947: Memory leak on invalid offset type in compound assignment
--FILE--
<?php
$array = [];
$key = [];
$array[$key] += [$key];
var_dump($array);
?>
--EXPECTF--
Warning: Illegal offset type in %s on line %d
array(0) {
}