When WP_Dependencies accept a string for a single dependency, make sure the string is not empty, see #20683
git-svn-id: http://core.svn.wordpress.org/trunk@21481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
87dc511c0f
commit
cbc9aabfa4
|
@ -245,7 +245,7 @@ class _WP_Dependency {
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
@list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args();
|
@list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args();
|
||||||
if ( is_string( $this->deps ) )
|
if ( is_string( $this->deps ) && ! empty( $this->deps ) )
|
||||||
$this->deps = array( $this->deps );
|
$this->deps = array( $this->deps );
|
||||||
elseif ( !is_array( $this->deps ) )
|
elseif ( !is_array( $this->deps ) )
|
||||||
$this->deps = array();
|
$this->deps = array();
|
||||||
|
|
Loading…
Reference in New Issue