mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Script Loader: Ignore deregistered dependencies in wp_dependencies_unique_hosts().
Prevents a PHP warning when a handle of a deregistered dependency is still in the queue. Fixes #37502. git-svn-id: https://develop.svn.wordpress.org/trunk@38174 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2874,6 +2874,10 @@ function wp_dependencies_unique_hosts() {
|
||||
foreach ( array( $wp_scripts, $wp_styles ) as $dependencies ) {
|
||||
if ( $dependencies instanceof WP_Dependencies && ! empty( $dependencies->queue ) ) {
|
||||
foreach ( $dependencies->queue as $handle ) {
|
||||
if ( ! isset( $dependencies->registered[ $handle ] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* @var _WP_Dependency $dependency */
|
||||
$dependency = $dependencies->registered[ $handle ];
|
||||
$parsed = wp_parse_url( $dependency->src );
|
||||
|
||||
Reference in New Issue
Block a user