From ccfc0d9d991300e5fdc8623fb3ffc5d35d8c427d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Schl=C3=BCter?= Date: Sat, 27 May 2006 18:23:48 +0000 Subject: [PATCH] - MFH Fix #37614 (Class name lowercased in error message) --- NEWS | 1 + Zend/zend_compile.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index b20fe40a04..d7ea3af133 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,7 @@ PHP NEWS - Added RFC2397 (data: stream) support. (Marcus) - Fixed memory leaks in openssl streams context options (Pierre) - Fixed handling of extremely long paths inside tempnam() function. (Ilia) +- Fixed bug #37614 (Class name lowercased in error message). (Johannes) - Fixed bug #37587 (var without attribute causes segfault). (Marcus) - Fixed bug #37569 (WDDX incorrectly encodes high-ascii characters). (Ilia) - Fixed bug #37565 (Using reflection::export with simplexml causing a crash). diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 11a1a8c4fc..8eb69d8f11 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2306,7 +2306,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 %s", opline->op2.u.constant.value.str.val); + zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", ce->name); } return NULL; } else { @@ -2332,7 +2332,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 %s", opline->op2.u.constant.value.str.val); + zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", ce->name); } return NULL; } else { @@ -2349,7 +2349,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *c /* Register the derived class */ if (zend_hash_add(class_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, pce, sizeof(zend_class_entry *), NULL)==FAILURE) { - zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", opline->op2.u.constant.value.str.val); + zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", ce->name); ce->refcount--; zend_hash_destroy(&ce->function_table); zend_hash_destroy(&ce->default_properties); -- 2.40.0