diff --git a/tests/issue_504_001.phpt b/tests/issue_504_001.phpt new file mode 100644 index 0000000..79d9658 --- /dev/null +++ b/tests/issue_504_001.phpt @@ -0,0 +1,20 @@ +--TEST-- +Test empty() : Segmentation fault caused by 'empty' check on a V8Function object +--SKIPIF-- + +--FILE-- +executeString(' + a = { + main: function() {} + }; +', null, V8Js::FLAG_FORCE_ARRAY | V8Js::FLAG_PROPAGATE_PHP_EXCEPTIONS); + +if (!empty($r['main'])) { + echo 'Ok' . PHP_EOL; +} +?> +--EXPECTF-- +Ok +