WordPress.org

Make WordPress Core

Changeset 21420


Ignore:
Timestamp:
08/04/2012 05:59:55 PM (7 years ago)
Author:
markjaquith
Message:

Let WP_Dependencies accept a string for a single dependency instead of requiring an array wrapper. props vhauri. fixes #20683

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class.wp-dependencies.php

    r19593 r21420  
    246246    function __construct() {
    247247        @list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args();
    248         if ( !is_array($this->deps) )
     248        if ( is_string( $this->deps ) )
     249            $this->deps = array( $this->deps );
     250        elseif ( !is_array( $this->deps ) )
    249251            $this->deps = array();
    250252    }
Note: See TracChangeset for help on using the changeset viewer.