1
0
Fork 0

Error out on wrong bin config

pull/606/merge
Jordi Boggiano 2012-04-23 10:14:02 +02:00
parent 15ab5868a3
commit 6a50dbd46d
1 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,10 @@ class ArrayLoader
$package->setExtra($config['extra']);
}
if (isset($config['bin']) && is_array($config['bin'])) {
if (isset($config['bin'])) {
if (!is_array($config['bin'])) {
throw new \UnexpectedValueException('Package '.$config['name'].'\'s bin key should be an array, '.gettype($config['bin']).' given.');
}
foreach ($config['bin'] as $key => $bin) {
$config['bin'][$key]= ltrim($bin, '/');
}