- MFH Fix #37614 (Class name lowercased in error message)

This commit is contained in:
Johannes Schlüter 2006-05-27 18:23:48 +00:00
parent 26145c2e0c
commit ccfc0d9d99
2 changed files with 4 additions and 3 deletions

1
NEWS
View File

@ -46,6 +46,7 @@ PHP NEWS
- Added RFC2397 (data: stream) support. (Marcus) - Added RFC2397 (data: stream) support. (Marcus)
- Fixed memory leaks in openssl streams context options (Pierre) - Fixed memory leaks in openssl streams context options (Pierre)
- Fixed handling of extremely long paths inside tempnam() function. (Ilia) - 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 #37587 (var without attribute causes segfault). (Marcus)
- Fixed bug #37569 (WDDX incorrectly encodes high-ascii characters). (Ilia) - Fixed bug #37569 (WDDX incorrectly encodes high-ascii characters). (Ilia)
- Fixed bug #37565 (Using reflection::export with simplexml causing a crash). - Fixed bug #37565 (Using reflection::export with simplexml causing a crash).

View File

@ -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; } * so we shut up about it. This allows the if (!defined('FOO')) { return; }
* approach to work. * 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; return NULL;
} else { } 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; } * so we shut up about it. This allows the if (!defined('FOO')) { return; }
* approach to work. * 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; return NULL;
} else { } else {
@ -2349,7 +2349,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *c
/* Register the derived class */ /* 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) { 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--; ce->refcount--;
zend_hash_destroy(&ce->function_table); zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->default_properties); zend_hash_destroy(&ce->default_properties);