WordPress.org

Make WordPress Core

Ticket #20683: 20683.2.diff

File 20683.2.diff, 515 bytes (added by vhauri, 2 years ago)

Updated diff with clearer array typecasting as suggested by @scribu

  • 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