mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Let WP_Dependencies accept a string for a single dependency instead of requiring an array wrapper. props vhauri. fixes #20683
git-svn-id: http://core.svn.wordpress.org/trunk@21420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
81286bad53
commit
eedce37675
@ -245,7 +245,9 @@ class _WP_Dependency {
|
||||
|
||||
function __construct() {
|
||||
@list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args();
|
||||
if ( !is_array($this->deps) )
|
||||
if ( is_string( $this->deps ) )
|
||||
$this->deps = array( $this->deps );
|
||||
elseif ( !is_array( $this->deps ) )
|
||||
$this->deps = array();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user