Skip to content

Commit

Permalink
Remove reading the object from the try/catch block. Leave only readin…
Browse files Browse the repository at this point in the history
…g the query parameters in it.
  • Loading branch information
Cyperghost committed Nov 26, 2024
1 parent 1a410bd commit 4e03021
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ public function readParameters()
}
EOT
);
$this->formObject = new CaptchaQuestion($queryParameters['id']);

if (!$this->formObject->getObjectID()) {
throw new IllegalLinkException();
}
} catch (MappingError) {
throw new IllegalLinkException();
}

$this->formObject = new CaptchaQuestion($queryParameters['id']);

if (!$this->formObject->getObjectID()) {
throw new IllegalLinkException();
}
}
}

0 comments on commit 4e03021

Please sign in to comment.