php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43344 Wrong error message for namespace::constant
Submitted: 2007-11-20 11:11 UTC Modified: 2007-12-07 17:12 UTC
From: felipensp at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3CVS-2007-11-20 (snap) OS:
Private report: No CVE-ID: None
 [2007-11-20 11:11 UTC] felipensp at gmail dot com
Description:
------------
See the error message below.

Reproduce code:
---------------
<?php

namespace foobar;

class foobar {
    const bar = 'foobar!';    
}

var_dump(namespace::bar); // Fatal error: Class 'foobar' not found

// var_dump(namespace::foobar::bar); # Ok, right


Expected result:
----------------
Some like "Constant 'bar' not found"

Actual result:
--------------
Fatal error: Class 'foobar' not found

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-24 12:32 UTC] jani@php.net
Another namespace issue.
 [2007-12-07 17:12 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC