Opened 4 months ago
Last modified 4 months ago
#61302 new enhancement
wp_style_loader_src() expects $_wp_admin_css_colors
Reported by: | crstauf | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | minor | Version: | |
Component: | Bootstrap/Load | Keywords: | has-patch |
Focuses: | Cc: |
Description
The function wp_style_loader_src()
expects that $_wp_admin_css_colors
should exist and be an array. This can create a PHP warning if the colors
dependency is loaded or style_loader_src
filter is used in a context where the global does not exist. Adding checks for the variable will prevent this warning.
Change History (1)
This ticket was mentioned in PR #6653 on WordPress/wordpress-develop by @crstauf.
4 months ago
#1
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.
Add checks to prevent PHP warning in contexts where
colors
dependency is printed orstyle_loader_src
is used where$_wp_admin_css_colors
is not defined or not an array.Trac ticket: https://core.trac.wordpress.org/ticket/61302#ticket