Skip to content

Commit

Permalink
Fix null variable in authority matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rastislav-chynoransky committed Dec 13, 2024
1 parent 9851bdd commit a8766df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Matchers/AuthorityMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public function matchAll(Item $item, $onlyExisting = false)
public function match($author, Item $item, $onlyExisting = false)
{
$parsed = $this::parse($author);
if (!$parsed) {
return collect();
}

if ($parsed['surname'] && $parsed['name']) {
$fullname = sprintf('%s %s', $parsed['name'], $parsed['surname']);
} else {
Expand Down

0 comments on commit a8766df

Please sign in to comment.