ID:               47601
 Updated by:       [email protected]
 Reported By:      david at grudl dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5.2CVS-2009-03-10
 New Comment:

This bug has been fixed in SVN.

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.




Previous Comments:
------------------------------------------------------------------------

[2010-02-08 12:31:34] [email protected]

Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=294761
Log: Fixed bug #47601 (defined() requires class to exist when testing
for class constants).

# Unifies behaviour with 5.3+

------------------------------------------------------------------------

[2009-03-09 00:15:49] david at grudl dot com

It seems this bug exists only in 5.2.x branch (since 5.2.4 - 5.2.9).
PHP 5.3.0beta1 which is older than 5.2.9 is not affected.

------------------------------------------------------------------------

[2009-03-08 22:55:57] david at grudl dot com

Description:
------------
Function defined() is very strict whether class constant is checking.
Non-declared (and not-autoloaded) class can be rather expressed as FALSE
than fatal error.

Reproduce code:
---------------
var_dump( defined('Test::VALUE') );

Expected result:
----------------
FALSE

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47601&edit=1

Reply via email to