From 672cf2766e041e70bfb511fd4d31a9c5c9d892a1 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Sun, 31 Jul 2016 18:25:28 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@38174 git-svn-id: http://core.svn.wordpress.org/trunk@38115 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 83eabe8937..4e049d5714 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8ebe91a686..33728e26ab 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-RC1-38173'; +$wp_version = '4.6-RC1-38174'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.