php-src/Zend/tests/bug63173.phpt
Nikita Popov 592b232e83 Fix bug #63173: Crash when invoking invalid array callback
The code did not check whether the zend_hash_index_find calls succeded,
so PHP crashed when an array callback was called that contains two elements
which don't have the indices 0 and 1.
2012-09-27 18:40:00 +02:00

13 lines
266 B
PHP

--TEST--
Bug #63173: Crash when invoking invalid array callback
--FILE--
<?php
// the important part here are the indexes 1 and 2
$callback = [1 => 0, 2 => 0];
$callback();
?>
--EXPECTF--
Fatal error: Array callback has to contain indices 0 and 1 in %s on line %d