Skip to content

Commit

Permalink
Add try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Dec 15, 2023
1 parent 1df5024 commit 445f4a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Annotator/ModelAnnotator.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,11 @@ protected function getAssociations(AssociationCollection $tableAssociations): ar
* @return string
*/
protected function throughAlias(BelongsToMany $association): string {
$through = $association->getThrough();
try {
$through = $association->getThrough();
} catch (Throwable) {
$through = null;
}
if ($through) {
if (is_object($through)) {
return $through->getAlias();
Expand Down

0 comments on commit 445f4a7

Please sign in to comment.