[wp-trac] [WordPress Trac] #35058: PHP Fatal when map_deep tries to work on an object that has a property by reference
WordPress Trac
noreply at wordpress.org
Tue Dec 29 05:38:50 UTC 2015
#35058: PHP Fatal when map_deep tries to work on an object that has a property by
reference
--------------------------------------+-------------------------
Reporter: jeff@… | Owner: swissspidy
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.4.1
Component: Formatting | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-------------------------
Changes (by dd32):
* status: closed => reopened
* resolution: fixed =>
Comment:
Turns out I missed the test changes required after this.
`(object) array( 'x' )` creates an "invalid" object in PHP5, objects with
numeric keys are not returned by `get_object_vars()` but are if you cast
it to an array. Of course under PHP4 & 7 those numeric keys are returned.
I'm going to switch out the tests to use `(object) array( 'var0' => 'x' )`
instead so it's compatible across the board.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35058#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list