php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53205 Make $php_errormsg global
Submitted: 2010-10-30 13:37 UTC Modified: 2010-11-02 03:54 UTC
From: info at fedushin dot ru Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 5.3.3 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-10-30 13:37 UTC] info at fedushin dot ru
Description:
------------
$php_errormsg would be much more useful for developers if it were available in global scope.
F.e. its value might be displayed in user-defined assert handler set by assert_options(ASSERT_CALLBACK,..).

Suggestion is to add boolean variable "track_errors_global" to php.ini.
If it's "On" $php_errormsg should be available in global scope (or maybe even be "super-global").


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-02 03:54 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2010-11-02 03:54 UTC] aharvey@php.net
Given that $php_errormsg and track_errors are leftovers from PHP 3, I don't think there's much likelihood of them receiving any changes at this point. (Honestly, I'd rather just see them removed.)

At any rate, you can emulate this easily enough in a PHP script by setting a global variable within a custom error handler. No need for another configuration option or a global variable to clutter up the global namespace.

Closing won't fix.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC