WordPress.org

Make WordPress Core

Ticket #20683: 20683.diff

File 20683.diff, 514 bytes (added by vhauri, 6 years ago)

Patch to allow a single $deps in WP_Dependencies to be passed as a string

  • class.wp-dependencies.php

     
    245245
    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        }
    251253