Skip to content

Commit 06ac14f

Browse files
committed
Avoid duplicate calls to interface implementation handler
1 parent 06750d7 commit 06ac14f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_inheritance.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,9 @@ static void zend_do_implement_interfaces(zend_class_entry *ce, zend_class_entry
15311531
ce->ce_flags |= ZEND_ACC_RESOLVED_INTERFACES;
15321532

15331533
i = num_parent_interfaces;
1534-
for (; i < ce->num_interfaces; i++) {
1534+
/* Note that new interfaces can be added during this loop due to interface inheritance.
1535+
* Use num_interfaces rather than ce->num_interfaces to not re-process the new ones. */
1536+
for (; i < num_interfaces; i++) {
15351537
do_interface_implementation(ce, ce->interfaces[i]);
15361538
}
15371539
}

0 commit comments

Comments
 (0)