Skip to content

Commit 79a4680

Browse files
committed
empty() test
1 parent 1e25cc8 commit 79a4680

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/issue_504_001.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Test empty() : Segmentation fault caused by 'empty' check on a V8Function object
3+
--SKIPIF--
4+
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5+
--FILE--
6+
<?php
7+
$v = new \V8Js();
8+
$r = $v->executeString('
9+
a = {
10+
main: function() {}
11+
};
12+
', null, V8Js::FLAG_FORCE_ARRAY | V8Js::FLAG_PROPAGATE_PHP_EXCEPTIONS);
13+
14+
if (!empty($r['main'])) {
15+
echo 'Ok' . PHP_EOL;
16+
}
17+
?>
18+
--EXPECTF--
19+
Ok
20+

0 commit comments

Comments
 (0)