Fixed potential undefined index in ArrayLoader.php
A source without a reference is invalid.pull/1671/head
parent
636aa965f7
commit
8534ab1dad
|
@ -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'])
|
||||
));
|
||||
|
|
Loading…
Reference in New Issue