Opened 8 years ago
Closed 8 years ago
#44104 closed defect (bug) (fixed)
Customize: Attempt to count uncountable value
| Reported by: | dlh | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9.8 |
| Component: | Customize | Version: | 4.7 |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit fixed-major |
| Cc: | Focuses: |
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
@
8 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Moving all tickets in 4.9.7 to 4.9.8.