iliaa                                    Mon, 08 Feb 2010 12:31:33 +0000

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+

Bug: http://bugs.php.net/47601 (Open) defined() requires class to exist when 
testing for class const (only in PHP_5_2)
      
Changed paths:
    U   php/php-src/branches/PHP_5_2/NEWS
    U   php/php-src/branches/PHP_5_2/Zend/tests/class_constants_002.phpt
    U   php/php-src/branches/PHP_5_2/Zend/zend_constants.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_2/NEWS   2010-02-08 12:08:41 UTC (rev 294760)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-02-08 12:31:33 UTC (rev 294761)
@@ -12,8 +12,9 @@
 - 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)
 - Upgraded bundled PCRE to version 8.01. (Ilia)

Modified: php/php-src/branches/PHP_5_2/Zend/tests/class_constants_002.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/Zend/tests/class_constants_002.phpt    
2010-02-08 12:08:41 UTC (rev 294760)
+++ php/php-src/branches/PHP_5_2/Zend/tests/class_constants_002.phpt    
2010-02-08 12:31:33 UTC (rev 294761)
@@ -28,4 +28,4 @@
 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

Modified: php/php-src/branches/PHP_5_2/Zend/zend_constants.c
===================================================================
--- php/php-src/branches/PHP_5_2/Zend/zend_constants.c  2010-02-08 12:08:41 UTC 
(rev 294760)
+++ php/php-src/branches/PHP_5_2/Zend/zend_constants.c  2010-02-08 12:31:33 UTC 
(rev 294761)
@@ -265,7 +265,6 @@
                                retval = 0;
                        }
                } else {
-                       zend_error(E_ERROR, "Class '%s' not found", class_name);
                        retval = 0;
                }
                efree(class_name);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to