Re: PHP5.3 closure problem

2009-04-26 Thread Tim Field
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  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}
>
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
phpshell-devel mailing list
phpshell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpshell-devel


PHP5.3 closure problem

2009-04-26 Thread Tim Field
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}
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
phpshell-devel mailing list
phpshell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpshell-devel