From d6ed09153f81f0e9e4533b68ff1b55f7d267054e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 23 Oct 2012 20:32:12 +0000 Subject: [PATCH] Revert [21420] and [21481]. Accepting a string caused back compat problems including the possibility of revealing previously hidden circular dependencies resulting in infinite loops. fixes #20683 #22111 see #21520 git-svn-id: https://develop.svn.wordpress.org/trunk@22286 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class.wp-dependencies.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/class.wp-dependencies.php b/wp-includes/class.wp-dependencies.php index 7aa5e5cb34..eb075c8574 100644 --- a/wp-includes/class.wp-dependencies.php +++ b/wp-includes/class.wp-dependencies.php @@ -247,10 +247,8 @@ class _WP_Dependency { var $extra = array(); function __construct() { - @list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args(); - if ( is_string( $this->deps ) && ! empty( $this->deps ) ) - $this->deps = array( $this->deps ); - elseif ( !is_array( $this->deps ) ) + @list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = func_get_args(); + if ( ! is_array($this->deps) ) $this->deps = array(); }