Opened 2 years ago
Closed 10 months ago
#61302 closed enhancement (fixed)
wp_style_loader_src() expects $_wp_admin_css_colors
| Reported by: | crstauf | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0 |
| Component: | Bootstrap/Load | Version: | |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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