Closed stesie closed 9 years ago
$v8 = new V8Js(); $JS = <<<EOT (function(foo) { print(foo); }); EOT; $func = $v8->executeString($JS, 'test', V8Js::FLAG_FORCE_ARRAY); var_dump($func); $func("Test-Foo Func Call\n");
... fails, because $func is converted to Array and hence isn't callable. Obviously the "force to array" rule shouldn't apply to functions. Just to normal objects.
Array
Fixed by https://github.com/preillyme/v8js/commit/53995ac616588c5e988a86628f1496ff668539fc ... however with wrong issue reference :(
... fails, because $func is converted to
Array
and hence isn't callable. Obviously the "force to array" rule shouldn't apply to functions. Just to normal objects.