Skip to content

Conversation

@nielsdos
Copy link
Member

check_empty is checked earlier up, so this variable is always true.

`check_empty` is checked earlier up, so this variable is always true.
}
ZEND_ASSERT(retval == &tmp_val);
bool res = check_empty ? i_zend_is_true(retval) : Z_TYPE(tmp_val) != IS_NULL;
bool res = i_zend_is_true(retval);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for being confused as always, but where is it checked? What are the possible values for this parameter? For example, DOM checks 3 values https://github.com/php/php-src/blob/master/ext/dom/php_dom.c#L455

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit above you can see an if (!check_empty) which returns without reading the column.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Facepalm. I was looking at row_prop_exists

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. For props the value of 2 for check_empty means checking if the property name exists without looking at its value. For dimensions, check_empty is a boolean

@nielsdos nielsdos merged commit c218f62 into php:master Jan 21, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants