diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-24 18:11:41 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-25 10:19:42 +0200 |
commit | 184ba0c91c3b688538d0274625241c640a8952eb (patch) | |
tree | aeaeee37ed45ccd03e7f0a395d4489b6ed387e7b /Zend/zend_operators.c | |
parent | c63a0e005abe4b00ab097dc47ca53d20788a6361 (diff) | |
download | php-git-184ba0c91c3b688538d0274625241c640a8952eb.tar.gz |
Remove recursive check from instanceof_interface
Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.
Only exception are instanceof checks performed during inheritance
itself. However, we already have unlinked_instanceof for this
purpose, it just needs to be taught to handle this case.
Closes GH-4857.
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index c2ea3cd65a..656316cc4e 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2328,7 +2328,7 @@ static zend_bool ZEND_FASTCALL instanceof_interface(const zend_class_entry *inst if (instance_ce->num_interfaces) { ZEND_ASSERT(instance_ce->ce_flags & ZEND_ACC_RESOLVED_INTERFACES); for (i = 0; i < instance_ce->num_interfaces; i++) { - if (instanceof_interface(instance_ce->interfaces[i], ce)) { + if (instance_ce->interfaces[i] == ce) { return 1; } } |