FAQ
Edit report at http://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: Open
Type: Bug
Package: PHP_Shell
PHP Version: 5.3.6
Roadmap Versions:
New Comment:

Thanks for the patch Dan


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

[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

  • Daniel Oconnor at Nov 16, 2011 at 1:26 pm
    Edit report at http://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: Open
    +Status: Closed
    Type: Bug
    Package: PHP_Shell
    PHP Version: 5.3.6
    -Assigned To:
    +Assigned To: doconnor
    Roadmap Versions:
    New Comment:

    -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.




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

    [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}

    ------------------------------------------------------------------------
  • Daniel Oconnor at Nov 21, 2011 at 12:41 pm
    Edit report at http://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: Closed
    +Status: Open
    Type: Bug
    Package: PHP_Shell
    PHP Version: 5.3.6
    Assigned To: doconnor
    Roadmap Versions:
    New Comment:

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


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

    [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}

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedNov 16, '11 at 1:22p
activeNov 21, '11 at 12:41p
posts3
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 3 posts

People

Translate

site design / logo © 2022 Grokbase