Skip to content

Commit 445f4a7

Browse files
committed
Add try catch
1 parent 1df5024 commit 445f4a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Annotator/ModelAnnotator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,11 @@ protected function getAssociations(AssociationCollection $tableAssociations): ar
310310
* @return string
311311
*/
312312
protected function throughAlias(BelongsToMany $association): string {
313-
$through = $association->getThrough();
313+
try {
314+
$through = $association->getThrough();
315+
} catch (Throwable) {
316+
$through = null;
317+
}
314318
if ($through) {
315319
if (is_object($through)) {
316320
return $through->getAlias();

0 commit comments

Comments
 (0)