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
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: felipensp at gmail dot com
New email:
PHP Version: OS:

 

 [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 Apr 30 04:01:30 2024 UTC