php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62580 Argument-resolving of set_error_handler() within namespaces
Submitted: 2012-07-16 17:28 UTC Modified: 2012-07-16 17:34 UTC
From: r dot wilczek at web-appz dot de Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.4.4 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: r dot wilczek at web-appz dot de
New email:
PHP Version: OS:

 

 [2012-07-16 17:28 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-16 17:34 UTC] r dot wilczek at web-appz dot de
argh. Forget this one. Not an issue.
 [2012-07-16 17:34 UTC] r dot wilczek at web-appz dot de
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 10:01:31 2024 UTC