From: Johannes Schlüter Date: Sat, 27 May 2006 17:58:50 +0000 (+0000) Subject: - Fix #37614 (Class name lowercased in error message) X-Git-Tag: BEFORE_NEW_OUTPUT_API~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=341ffb3f3d7c1535165375a9fc17ed3906aa23c0;p=php - Fix #37614 (Class name lowercased in error message) --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 449ff9bb55..c00a68045d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -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);