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
This commit is contained in:
Ryan Boren 2012-10-23 20:32:12 +00:00
parent 3e1d0c6e16
commit 02d584b4c7

View File

@ -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();
}