Opened 19 months ago
Closed 2 weeks ago
#61302 closed enhancement (fixed)
wp_style_loader_src() expects $_wp_admin_css_colors
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | 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 (3)
This ticket was mentioned in PR #6653 on WordPress/wordpress-develop by @crstauf.
19 months ago
#1
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.
Add checks to prevent PHP warning in contexts where
colorsdependency is printed orstyle_loader_srcis used where$_wp_admin_css_colorsis not defined or not an array.Trac ticket: https://core.trac.wordpress.org/ticket/61302#ticket