Created
May 15, 2012 16:31
-
-
Save brandwaffle/2703078 to your computer and use it in GitHub Desktop.
Changes WP_Dependencies' constructor to handle a string $deps and convert it to an array with a single element (props @abackstrom)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: class.wp-dependencies.php | |
=================================================================== | |
--- class.wp-dependencies.php (revision 20792) | |
+++ class.wp-dependencies.php (working copy) | |
@@ -245,7 +245,9 @@ | |
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(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment