]> granicus.if.org Git - php/commitdiff
- Fix #37614 (Class name lowercased in error message)
authorJohannes Schlüter <johannes@php.net>
Sat, 27 May 2006 17:58:50 +0000 (17:58 +0000)
committerJohannes Schlüter <johannes@php.net>
Sat, 27 May 2006 17:58:50 +0000 (17:58 +0000)
Zend/zend_compile.c

index 449ff9bb5578bfa67f75bb3d0ed1bd0950deb451..c00a68045d3bd1083d5adc0604bb654d55c9b652 100644 (file)
@@ -2445,7 +2445,7 @@ ZEND_API zend_class_entry *do_bind_class(zend_op *opline, HashTable *class_table
                         * so we shut up about it.  This allows the if (!defined('FOO')) { return; }
                         * approach to work.
                         */
-                       zend_error(E_COMPILE_ERROR, "Cannot redeclare class %R", Z_TYPE(opline->op2.u.constant), Z_UNIVAL(opline->op2.u.constant));
+                       zend_error(E_COMPILE_ERROR, "Cannot redeclare class %v", ce->name);
                }
                return NULL;
        } else {
@@ -2471,7 +2471,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *c
                         * so we shut up about it.  This allows the if (!defined('FOO')) { return; }
                         * approach to work.
                         */
-                       zend_error(E_COMPILE_ERROR, "Cannot redeclare class %R", Z_TYPE(opline->op2.u.constant), Z_UNIVAL(opline->op2.u.constant));
+                       zend_error(E_COMPILE_ERROR, "Cannot redeclare class %v", ce->name);
                }
                return NULL;
        } else {
@@ -2488,7 +2488,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *c
 
        /* Register the derived class */
        if (zend_u_hash_add(class_table, Z_TYPE(opline->op2.u.constant), Z_UNIVAL(opline->op2.u.constant), Z_UNILEN(opline->op2.u.constant)+1, pce, sizeof(zend_class_entry *), NULL)==FAILURE) {
-               zend_error(E_COMPILE_ERROR, "Cannot redeclare class %R", Z_TYPE(opline->op2.u.constant), Z_UNIVAL(opline->op2.u.constant));
+               zend_error(E_COMPILE_ERROR, "Cannot redeclare class %v", ce->name);
                ce->refcount--;
                zend_hash_destroy(&ce->function_table);
                zend_hash_destroy(&ce->default_properties);