Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#61302 new enhancement

wp_style_loader_src() expects $_wp_admin_css_colors

Reported by: crstauf's profile crstauf Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Bootstrap/Load Keywords: has-patch
Focuses: Cc:


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.

3 weeks ago

  • Keywords has-patch added

Add checks to prevent PHP warning in contexts where colors dependency is printed or style_loader_src is used where $_wp_admin_css_colors is not defined or not an array.

Trac ticket:

Note: See TracTickets for help on using tickets.