mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Don't imply SILENT from NO_AUTOLOAD
We have separate flags for non-autoloading class fetches and silent class fetches. There's no reason why NO_AUTOLOAD should be special-cased to be implicitly silent.
This commit is contained in:
parent
c8a8c47f7e
commit
4df39f4bd0
5 changed files with 17 additions and 20 deletions
|
@ -1523,9 +1523,8 @@ check_fetch_type:
|
|||
break;
|
||||
}
|
||||
|
||||
if (fetch_type & ZEND_FETCH_CLASS_NO_AUTOLOAD) {
|
||||
return zend_lookup_class_ex(class_name, NULL, fetch_type);
|
||||
} else if ((ce = zend_lookup_class_ex(class_name, NULL, fetch_type)) == NULL) {
|
||||
ce = zend_lookup_class_ex(class_name, NULL, fetch_type);
|
||||
if (!ce) {
|
||||
if (!(fetch_type & ZEND_FETCH_CLASS_SILENT) && !EG(exception)) {
|
||||
if (fetch_sub_type == ZEND_FETCH_CLASS_INTERFACE) {
|
||||
zend_throw_or_error(fetch_type, NULL, "Interface \"%s\" not found", ZSTR_VAL(class_name));
|
||||
|
@ -1543,11 +1542,8 @@ check_fetch_type:
|
|||
|
||||
zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, zend_string *key, int fetch_type) /* {{{ */
|
||||
{
|
||||
zend_class_entry *ce;
|
||||
|
||||
if (fetch_type & ZEND_FETCH_CLASS_NO_AUTOLOAD) {
|
||||
return zend_lookup_class_ex(class_name, key, fetch_type);
|
||||
} else if ((ce = zend_lookup_class_ex(class_name, key, fetch_type)) == NULL) {
|
||||
zend_class_entry *ce = zend_lookup_class_ex(class_name, key, fetch_type);
|
||||
if (!ce) {
|
||||
if (fetch_type & ZEND_FETCH_CLASS_SILENT) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue