Skip to content

Commit

Permalink
Fixed constraint input validation (#7)
Browse files Browse the repository at this point in the history
Co-authored-by: Martins Rucevskis <[email protected]>
  • Loading branch information
MartinsRucevskis and Martins Rucevskis authored Nov 21, 2023
1 parent a45ac72 commit fea07f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MajorConstraintUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

foreach ($input->getOption('constraint') as $option) {
$input = explode(':', $option);
if(!isset($option[1], $option[2])) {
if(!isset($input[0], $input[1])) {
throw new Exception('Wrong input constraint, should be as package:version');
}
$constraints[$input[0]] = $input[1];
Expand Down

0 comments on commit fea07f9

Please sign in to comment.