[wp-trac] [WordPress Trac] #55257: map_deep() function incompatibility with incomplete objects in PHP 8.0+
WordPress Trac
noreply at wordpress.org
Wed Jan 11 23:10:34 UTC 2023
#55257: map_deep() function incompatibility with incomplete objects in PHP 8.0+
-------------------------------------------+---------------------
Reporter: codex-m | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.2
Component: Formatting | Version: 5.9.1
Severity: major | Resolution:
Keywords: has-patch php8 has-unit-tests | Focuses:
-------------------------------------------+---------------------
Comment (by petitphp):
I've created a PR using the last patch with new unit tests.
Currently, the tests are failing for all PHP versions below 7.2. This come
from an old behavior in versions <=7.1 where `is_object` return `false`
for `__PHP_Incomplete_Class` (see: https://www.php.net/manual/en/function
.is-object.php / https://3v4l.org/iPBeN).
I think it's safe to remove the check for `is_object` and only keep the
`instanceof` in the condition.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55257#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list