1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00

Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix error message
This commit is contained in:
Dmitry Stogov
2019-12-10 22:17:42 +03:00

View File

@@ -3862,7 +3862,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));