1
0
Fork 0

Merge pull request #1671 from thomas-gay/master

Fixed potential undefined index in ArrayLoader.php
pull/1672/head
Jordi Boggiano 2013-03-07 01:04:21 -08:00
commit eeaca89fee
1 changed files with 2 additions and 2 deletions

View File

@ -72,9 +72,9 @@ class ArrayLoader implements LoaderInterface
}
if (isset($config['source'])) {
if (!isset($config['source']['type']) || !isset($config['source']['url'])) {
if (!isset($config['source']['type']) || !isset($config['source']['url']) || !isset($config['source']['reference'])) {
throw new \UnexpectedValueException(sprintf(
"Package %s's source key should be specified as {\"type\": ..., \"url\": ...},\n%s given.",
"Package %s's source key should be specified as {\"type\": ..., \"url\": ..., \"reference\": ...},\n%s given.",
$config['name'],
json_encode($config['source'])
));