Bug #66094 [Asn->Csd]: unregister_tick_function tries to cast a Closure to a string
| From: | laruence@php.net | Date: | Sun, 17 Nov 2013 09:38:18 +0000 |
| Subject: | Bug #66094 [Asn->Csd]: unregister_tick_function tries to cast a Closure to a string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182800@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66094&edit=1
ID: 66094
Updated by: laruence@php.net
Reported by: bwoebi@php.net
Summary: unregister_tick_function tries to cast a Closure to
a string
-Status: Assigned
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: Irrelevant
PHP Version: master-Git-2013-11-14 (Git)
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=823e330c75a7ed87dcdcd692f8672420c1abe244
Log: Fixed Bug #66094 (unregister_tick_function tries to cast a Closure to a string)
Previous Comments:
------------------------------------------------------------------------
[2013-11-14 10:37:58] bwoebi@php.net
Description:
------------
Closures should be unregistrable too.
See also http://lxr.php.net/xref/PHP_TRUNK/ext/standard/basic_functions.c#5782
Test script:
---------------
declare(ticks=1);
register_tick_function($closure = function () { echo "Tick!\n"; });
unregister_tick_function($closure);
Expected result:
----------------
Tick!
// no error...
Actual result:
--------------
Tick!
PHP Catchable fatal error: Object of class Closure could not be converted to string in php shell
code on line 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66094&edit=1