Similar problem (#79022) also exists in Interfaces

This commit is contained in:
Xinchen Hui 2019-12-24 14:20:55 +08:00
parent 153c9cc346
commit f09b958e90
2 changed files with 19 additions and 2 deletions

View file

@ -1476,7 +1476,7 @@ static inline void class_exists_impl(INTERNAL_FUNCTION_PARAMETERS, int flags, in
}
if (ce) {
RETURN_BOOL((flags == 0 || (ce->ce_flags & flags)) && !(ce->ce_flags & skip_flags));
RETURN_BOOL(((ce->ce_flags & flags) == flags) && !(ce->ce_flags & skip_flags));
} else {
RETURN_FALSE;
}
@ -1495,7 +1495,7 @@ ZEND_FUNCTION(class_exists)
Checks if the class exists */
ZEND_FUNCTION(interface_exists)
{
class_exists_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_INTERFACE, 0);
class_exists_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_LINKED|ZEND_ACC_INTERFACE, 0);
}
/* }}} */