Fix error message

This commit is contained in:
Dmitry Stogov 2019-12-10 22:17:10 +03:00
parent 2badeb511b
commit 518a8f89c1

View File

@ -3777,7 +3777,8 @@ static void preload_link(void)
}
if (!(ce->ce_flags & ZEND_ACC_LINKED)) {
zend_string *key = zend_string_tolower(ce->name);
if (zend_hash_exists(EG(class_table), key)) {
if (!(ce->ce_flags & ZEND_ACC_ANON_CLASS)
&& zend_hash_exists(EG(class_table), key)) {
zend_error_at(
E_WARNING, ZSTR_VAL(ce->info.user.filename), ce->info.user.line_start,
"Can't preload already declared class %s", ZSTR_VAL(ce->name));