diff --git a/patchedWebtrees/SharedPlace.php b/patchedWebtrees/SharedPlace.php index ad588fe..957663a 100644 --- a/patchedWebtrees/SharedPlace.php +++ b/patchedWebtrees/SharedPlace.php @@ -1484,7 +1484,10 @@ public function primaryPlace(): Place { return $this->primaryPlaceAt(GedcomDateInterval::createNow()); } - public function primaryPlaceAt(GedcomDateInterval $date, ?string $query = null): Place { + public function primaryPlaceAt( + GedcomDateInterval $date, + ?string $query = null): Place { + $firstMatch = null; if ($query !== null) { @@ -1519,7 +1522,7 @@ public function primaryPlaceAt(GedcomDateInterval $date, ?string $query = null): $this->getTransitiveParentsAt($date)); if (sizeof($namesAsString) === 0) { - throw new \Exception("unexpectedly empty!"); + throw new \Exception("unexpectedly empty for " . $firstMatch['fullNN'] . " at date " . $date->toGedcomString(0, true)); } if (sizeof($namesAsString) !== 1) {