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
This commit is contained in:
Ryan Boren 2012-10-23 20:32:12 +00:00
parent 079288f0c8
commit d6ed09153f
1 changed files with 2 additions and 4 deletions

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