From: Ilia Alshanetsky Date: Mon, 8 Feb 2010 12:31:33 +0000 (+0000) Subject: Fixed bug #47601 (defined() requires class to exist when testing for class constants). X-Git-Tag: php-5.2.13RC2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9be8c2ba3c12d588269f62da661a6ecade1271b6;p=php Fixed bug #47601 (defined() requires class to exist when testing for class constants). # Unifies behaviour with 5.3+ --- diff --git a/NEWS b/NEWS index 428bf72025..1f8aa5b1e5 100644 --- 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) diff --git a/Zend/tests/class_constants_002.phpt b/Zend/tests/class_constants_002.phpt index 9aad8088da..00f85daef7 100644 --- a/Zend/tests/class_constants_002.phpt +++ b/Zend/tests/class_constants_002.phpt @@ -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 diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index d56d6d9fc3..45bd410bd7 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -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);