Avoid choking on non-string constraints, fixes #5807
parent
e32c09e13a
commit
f320c67534
|
@ -232,6 +232,9 @@ class ArrayLoader implements LoaderInterface
|
||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
foreach ($links as $target => $constraint) {
|
foreach ($links as $target => $constraint) {
|
||||||
|
if (!is_string($constraint)) {
|
||||||
|
throw new \UnexpectedValueException('Link constraint in '.$source.' '.$description.' > '.$target.' should be a string, got '.gettype($constraint) . ' (' . var_export($constraint, true) . ')');
|
||||||
|
}
|
||||||
if ('self.version' === $constraint) {
|
if ('self.version' === $constraint) {
|
||||||
$parsedConstraint = $this->versionParser->parseConstraints($sourceVersion);
|
$parsedConstraint = $this->versionParser->parseConstraints($sourceVersion);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue