Avoid class name validation if it's already have IS_STR_CLASS_NAME_MAP_PTR flag.

This commit is contained in:
Dmitry Stogov 2021-09-01 16:02:11 +03:00
parent 1e012ecb3f
commit c7fdf9c139

View File

@ -1097,7 +1097,7 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string *
}
/* Verify class name before passing it to the autoloader. */
if (!key && !zend_is_valid_class_name(name)) {
if (!key && !ZSTR_HAS_CE_CACHE(name) && !zend_is_valid_class_name(name)) {
zend_string_release_ex(lc_name, 0);
return NULL;
}