]> granicus.if.org Git - php/commitdiff
Fixed bug #47601 (defined() requires class to exist when testing for class constants).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 8 Feb 2010 12:31:33 +0000 (12:31 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 8 Feb 2010 12:31:33 +0000 (12:31 +0000)
# Unifies behaviour with 5.3+

NEWS
Zend/tests/class_constants_002.phpt
Zend/zend_constants.c

diff --git a/NEWS b/NEWS
index 428bf72025f8b18e59c9d9ca55c10be2839091cc..1f8aa5b1e588958bbf0c58fa66e45b58265d8009 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,7 +12,8 @@ PHP                                                                        NEWS
 - Fixed bug #50727 (Accessing mysqli->affected_rows on no connection causes
   segfault). (Andrey, Johannes)
 - Fixed bug #48667 (Implementing Iterator and IteratorAggregate). (Etienne)
-
+- Fixed bug #47601 (defined() requires class to exist when testing for class
+  constants). (Ilia)
 
 28 Jan 2010, PHP 5.2.13RC1
 - Updated timezone database to version 2010.2. (Derick)
index 9aad8088da800e350d1025d4a9630d815402ef89..00f85daef71ca63d437f85f3db5514175945dbc6 100644 (file)
@@ -28,4 +28,4 @@ int(1)
 int(5)
 int(10)
 
-Fatal error: Class 'NoSuchClass' not found in %s on line %d
+Fatal error: Undefined class constant 'NoSuchClass::val' in %s on line %d
index d56d6d9fc3410257dad568f5e02e73c2d683ca22..45bd410bd7bded1e441169504b72af4a2e62bf4c 100644 (file)
@@ -265,7 +265,6 @@ ZEND_API int zend_get_constant_ex(char *name, uint name_len, zval *result, zend_
                                retval = 0;
                        }
                } else {
-                       zend_error(E_ERROR, "Class '%s' not found", class_name);
                        retval = 0;
                }
                efree(class_name);