From 02d584b4c7928bb4b0c79cff214debe60b552b5d 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: http://core.svn.wordpress.org/trunk@22286 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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(); }