﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
20683,WP_Dependencies' constructor should accept a string/array value for $deps rather than converting a string to an empty array,vhauri,markjaquith,"Currently, WP_Dependencies' constructor takes any $deps value that's not an array and converts it to an empty array. I propose bringing the constructor's behavior more in line with standard WP function paramater behavior by accepting a string as a single dependency. Essentially this involves adding an is_string() check on $deps before checking if it's not an array, and creating an array with a single element in the case that it is a string. 


{{{
if ( !is_array($this->deps) )
  $this->deps = array();
}}}

becomes

{{{
if ( is_string( $this->deps ) )
  $this->deps = (array) $this->deps;
elseif ( !is_array( $this->deps ) )
  $this->deps = array();
}}}

See the attached diff for a proposed patch.",enhancement,reopened,normal,Awaiting Review,General,,normal,,has-patch,
