[php-src] PR #20379: Fix GH-20374: PHP with tidy and custom-tags
| From: | ndossche | Date: | Mon, 03 Nov 2025 20:28:02 +0000 |
| Subject: | [php-src] PR #20379: Fix GH-20374: PHP with tidy and custom-tags | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-33910@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/20379
Author: ndossche
Both enums and integers map to TidyInteger, however, in the TidyInteger case we always used
zval_get_long(). So for a non-numeric string, this would get turned into 0. 0 is the first enum
value in that case, so the wrong enum value could be selected.
To solve this, add special handling for strings and (stringable) objects such that we can explicitly
check for numeric strings, and if they're not, handle them as normal strings instead of as 0.