Merge pull request #4088 from nevvermind/override_init_array
Fix "Invalid argument supplied for foreach()" on a new PlaformRepository objpull/4103/head
commit
cdcc99e73d
|
@ -32,15 +32,14 @@ class PlatformRepository extends ArrayRepository
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
private $overrides;
|
||||
private $overrides = array();
|
||||
|
||||
public function __construct(array $packages = array(), array $overrides = array())
|
||||
{
|
||||
parent::__construct($packages);
|
||||
$this->overrides = array();
|
||||
foreach ($overrides as $name => $version) {
|
||||
$this->overrides[strtolower($name)] = array('name' => $name, 'version' => $version);
|
||||
}
|
||||
parent::__construct($packages);
|
||||
}
|
||||
|
||||
protected function initialize()
|
||||
|
|
Loading…
Reference in New Issue