[php-src] PR #21690: Fix GH-21687: assertion failure in zend_enum_fetch_case_name after array_walk
| From: | iliaal | Date: | Thu, 09 Apr 2026 16:31:01 +0000 |
| Subject: | [php-src] PR #21690: Fix GH-21687: assertion failure in zend_enum_fetch_case_name after array_walk | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35637@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21690
Author: iliaal
Fixes #21687
array_walk() wraps object properties in IS_REFERENCE when passing them to
the callback. For enum objects, this converts the name property from IS_STRING to
IS_REFERENCE in-place. A subsequent var_dump() calls
zend_enum_fetch_case_name() which asserts IS_STRING, triggering an
assertion failure.
Derefs through IS_REFERENCE in both zend_enum_fetch_case_name() and
zend_enum_fetch_case_value() before accessing the value.