diff --git a/src/NodaWikidataFetcher.php b/src/NodaWikidataFetcher.php index e9dd758..ab7e9a3 100644 --- a/src/NodaWikidataFetcher.php +++ b/src/NodaWikidataFetcher.php @@ -682,7 +682,11 @@ final class NodaWikidataFetcher { if ($actor_dates['persinst_geburtsjahr'] === '') { // Try to get birth date - if (!empty($data['claims']['P569']) and !empty($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['time'])) { + if (!empty($data['claims']['P569']) + and !empty($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['time']) + // Ignore entries with century / very inprecise birth dates + and (empty($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['precision']) || (int)$data['claims']['P569']['0']['mainsnak']['datavalue']['value']['precision'] !== 7) + ) { $birth_date = self::wikidataBirthDeathToYear($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['time']); }