From: Tim F. <fie...@gm...> - 2009-04-26 23:24:58
|
This seems to fix it on line 557 of Shell.php changed from if (!function_exists($func)) { to if (!($func instanceof Closure) && !function_exists($func)) { On Mon, Apr 27, 2009 at 11:04 AM, Tim Field <fie...@gm...> wrote: > Hello > > It looks like php-shell is having trouble parsing the new closure syntax. > Does anyone have a solution to this ? > > Thanks > Tim > > >>$r = function($a,$b){$a+$b;}; > > >> $r(1,2); > Exception (code: 0) got thrown > exception 'Exception' with message '/usr/share/php/PHP/Shell.php:557 > function_exists() expects parameter 1 to be string, object given' in > /usr/share/php/php-shell-cmd.php:54 > Stack trace: > #0 [internal function]: __shell_default_error_handler(2, > 'function_exists...', '/usr/share/php/...', 557, Array) > #1 /usr/share/php/PHP/Shell.php(557): function_exists(Object(Closure)) > #2 /usr/share/php/php-shell-cmd.php(116): PHP_Shell->parse() > #3 {main} > |