Opened 6 years ago
Closed 6 years ago
#44104 closed defect (bug) (fixed)
Customize: Attempt to count uncountable value
Reported by: | dlh | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.9.8 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Customize | Keywords: | has-patch has-unit-tests commit fixed-major |
Focuses: | Cc: |
Description
WP_Customize_Nav_Menus::search_available_items_query()
attempts to count an instance of WP_Customize_Setting
, which generates a warning in PHP 7.2.
It looks to me like the intent was to count the value of the setting instead, which should be an array.
Attachments (2)
Change History (10)
#4
@
6 years ago
- Keywords has-unit-tests added; needs-unit-tests removed
It looks to me like this warning can be generated in the existing test for search_available_items_query()
by ensuring that the nav_menus_created_posts
setting has been added, which can be done by calling do_action( 'customize_register' )
at the beginning of the test. test_save_nav_menus_created_posts()
uses a similar pattern. 44104.2.diff adds that line to the test.
#6
@
6 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 43480:
Note: See
TracTickets for help on using
tickets.
Moving all tickets in 4.9.7 to 4.9.8.