Bug #62580 [Opn->Csd]: Argument-resolving of set_error_handler() within namespaces

From: Date: Mon, 16 Jul 2012 17:34:30 +0000
Subject: Bug #62580 [Opn->Csd]: Argument-resolving of set_error_handler() within namespaces
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-172014@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62580&edit=1 ID: 62580 User updated by: r dot wilczek at web-appz dot de Reported by: r dot wilczek at web-appz dot de Summary: Argument-resolving of set_error_handler() within namespaces -Status: Open +Status: Closed Type: Bug Package: *General Issues Operating System: Linux PHP Version: 5.4.4 Block user comment: N Private report: N New Comment: argh. Forget this one. Not an issue. Previous Comments: ------------------------------------------------------------------------ [2012-07-16 17:28:03] r dot wilczek at web-appz dot de Description: ------------ Within a namespace, set_error_handler($callable) tries to resolve $callable against this namespace, if $callable is a simple string. This is inconsistent to other PHP-APIs, which do not resolve static global functionnames against the current namespace. Test script: --------------- <?php namespace Foo; function handle() {} set_error_handler('handle'); Expected result: ---------------- # no error, warning etc. at all Actual result: -------------- PHP Warning: set_error_handler() expects the argument (handle) to be a valid callback ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62580&edit=1

« previous php.bugs (#172014) next »