Skip to content

Commit ca3813a

Browse files
iluuu1994bwoebi
andauthored
Embed initial stop cond into while cond (@bwoebi)
Co-authored-by: Bob Weinand <[email protected]>
1 parent 1bbbd19 commit ca3813a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Zend/zend_inheritance.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,9 +1694,8 @@ void zend_build_properties_info_table(zend_class_entry *ce)
16941694
if (UNEXPECTED(root_prop->flags & ZEND_ACC_VIRTUAL)) {
16951695
/* Prototype is virtual, we need to manually hunt down the first backed property. */
16961696
root_prop = prop;
1697-
while (true) {
1698-
zend_class_entry *parent_ce = root_prop->ce->parent;
1699-
if (!parent_ce) { break; }
1697+
zend_class_entry *parent_ce;
1698+
while ((parent_ce = root_prop->ce->parent)) {
17001699
zend_property_info *parent_prop = zend_hash_find_ptr(&parent_ce->properties_info, key);
17011700
if (!parent_prop
17021701
|| parent_prop->prototype != prop->prototype

0 commit comments

Comments
 (0)