Opened 11 years ago
Closed 10 years ago
#29743 closed task (blessed) (fixed)
warning with join in nav-menu-template.php (L 98) when apply_filters nav_menu_css_class return null
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Menus | Keywords: | needs-patch revert |
Focuses: | Cc: |
Description
there is a warning because apply_filters on nav_menu_css_class return null and a warning happens in join clause , file "nav-menu-template.php" line 98
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #core by briandichiara. View the logs.
10 years ago
#3
@
10 years ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed
In 30032:
#5
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
there is a warning because apply_filters on nav_menu_css_class return null
I think this should be considered a developer error. If the goal is to remove the classes, __return_empty_array()
should be used here instead of __return_null()
.
But if we're going to keep [30032], we should do the same for body_class
, post_class
, comment_class
, and page_css_class
filters as well.
#6
@
10 years ago
- Keywords needs-patch added; has-patch removed
- Owner changed from markjaquith to johnbillion
- Status changed from reopened to assigned
- Type changed from enhancement to task (blessed)
I would like to revert r30032. I agree with Sergey that this is a developer error and the warning is appropriate.
patch for nav-menu-template.php, resolves notices when non-array passed through filter