Bug #66094 [Opn->Asn]: unregister_tick_function tries to cast a Closure to a string

From: Date: Thu, 14 Nov 2013 10:38:21 +0000
Subject: Bug #66094 [Opn->Asn]: 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-182755@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: bwoebi@php.net Reported by: bwoebi@php.net Summary: unregister_tick_function tries to cast a Closure to a string -Status: Open +Status: Assigned Type: Bug Package: *General Issues Operating System: Irrelevant PHP Version: master-Git-2013-11-14 (Git) -Assigned To: +Assigned To: dmitry Block user comment: N Private report: N 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

« previous php.bugs (#182755) next »