Closed vyuldashev closed 7 years ago
I modified one of the phpt tests to reproduce this issue.
<?php
$l = new lua();
class A {
public static function intro($foo, $bar) {
throw new InvalidArgumentException("Invalid Argument");
echo $foo, $bar;
}
}
$l->registerCallback("callphp", array("A", "intro"));
try {
$l->eval(<<<CODE
callphp("foo", "bar");
CODE
);
} catch (Exception $e) {
var_dump($e->getMessage());
}
?>
In php7 this blows up with:
Fatal error: Lua::eval(): unsupported type `unknown' for lua`
In php54 the exception is caught and just prints string(16) "Invalid Argument"
I think the problem is that php_lua_send_zval_to_lua
doesn't support IS_UNDEF which appears to be a new type in php7.
this should be fixed, I will make a release soon, thanks
is there any test script to reproduce this?