[wp-trac] [WordPress Trac] #38540: Add PHP unit tests for theme starter content
WordPress Trac
noreply at wordpress.org
Wed Nov 9 01:35:31 UTC 2016
#38540: Add PHP unit tests for theme starter content
--------------------------+------------------
Reporter: westonruter | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------
Comment (by welcher):
I'm writing up some tests for `\get_theme_starter_content` and noticed
that it is possible to do this `add_theme_support( 'starter-content' )`
which causes a PHP invalid foreach error.
I am not sure how common that would be but there is no check in
'get_theme_starter_content` to ensure that `$theme_support` is an array.
I've attached a patch with tests to address this and introduce a new test
file for the method.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38540#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list