FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=18994&edit=1

ID: 18994
Updated by: daniel.oconnor@gmail.com
Reported By: djones109 at gmail dot com
Summary: Closures not properly supported
-Status: Assigned
+Status: Closed
Type: Bug
Package: PHP_Shell
PHP Version: 5.3.6
Assigned To: doconnor
Roadmap Versions:
New Comment:

-Status: Assigned
+Status: Closed
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.




Previous Comments:
------------------------------------------------------------------------

[2011-11-21 13:40:23] doconnor

-Status: Closed
+Status: Open
Oops, that seems to have broken a test.
http://test.pear.php.net:8080/job/PHP_Shell/

------------------------------------------------------------------------

[2011-11-16 14:25:27] doconnor

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: doconnor
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

------------------------------------------------------------------------

[2011-11-16 14:21:52] doconnor

Thanks for the patch Dan

------------------------------------------------------------------------

[2011-11-14 18:29:44] goodevilgenius

Added #patch bug:18994;patch:add-closure-support;revision:1321295384;.

------------------------------------------------------------------------

[2011-11-14 18:03:14] goodevilgenius

Description:
------------
When Closures (anonymous functions) are used in PHP_Shell, a
function_exists error is thrown.

Test script:
---------------
$f = function() { echo "foobar"; }
$f();


Expected result:
----------------
foobar

Actual result:
--------------
Exception (code: 0) got thrown
exception 'Exception' with message
'/usr/share/php/PHP/Shell.php:746
function_exists() expects parameter 1 to be string, object
given' in /usr/share/php/php-shell-cmd.php:70
Stack trace:
#0 [internal function]: PHP_Shell_defaultErrorHandler(2,
'function_exists...', '/usr/share/php/...', 746, Array)
#1 /usr/share/php/PHP/Shell.php(746):
function_exists(Object(Closure))
#2 /usr/share/php/php-shell-cmd.php(146): PHP_Shell-
parse()
#3 {main}

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 9, '11 at 9:49a
activeDec 9, '11 at 9:49a
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase