mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fix inheritance rule for interface Traversable
This commit is contained in:
parent
665a834a76
commit
3edabd01bb
1 changed files with 1 additions and 1 deletions
|
@ -285,7 +285,7 @@ static int zend_implement_traversable(zend_class_entry *interface, zend_class_en
|
||||||
/* check that class_type is traversable at c-level or implements at least one of 'aggregate' and 'Iterator' */
|
/* check that class_type is traversable at c-level or implements at least one of 'aggregate' and 'Iterator' */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (class_type->get_iterator) {
|
if (class_type->get_iterator || (class_type->parent && class_type->parent->get_iterator) {
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
for (i = 0; i < class_type->num_interfaces; i++) {
|
for (i = 0; i < class_type->num_interfaces; i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue