[wp-trac] [WordPress Trac] #44124: Adding is_countable() check to custom-header.php
WordPress Trac
noreply at wordpress.org
Mon May 21 06:53:09 UTC 2018
#44124: Adding is_countable() check to custom-header.php
-------------------------------------------+---------------------
Reporter: ianbelanger | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9.7
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing close | Focuses:
-------------------------------------------+---------------------
Changes (by johnbillion):
* keywords: has-patch needs-testing => has-patch needs-testing close
* version: trunk =>
Comment:
Thanks for your patch @ianbelanger.
I don't believe this is appropriate use of `is_countable()`. If a bug is
introduced elsewhere which results in `$headers` being set to a non-
countable value (for example via the return value of
`get_uploaded_header_images()`), it's not a good idea to mask it via logic
such as this. This is the reason that PHP now triggers warnings when
attempting to count un-countable values since PHP 7.2.
See [ticket:44123#comment:11].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44124#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list