Improve handling of broken GND references
This commit is contained in:
@@ -143,7 +143,7 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new MDInvalidNodaLink("Failed to get norm data repository based on the provided link");
|
throw new MDInvalidNodaLink("Failed to get norm data repository based on the provided link: " . $input);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,6 +478,10 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
|
|||||||
if (str_contains($id, ' ')) {
|
if (str_contains($id, ' ')) {
|
||||||
$id = strtr($id, [' ' => '', "\t" => '']);
|
$id = strtr($id, [' ' => '', "\t" => '']);
|
||||||
}
|
}
|
||||||
|
if (str_contains($id, ',')) {
|
||||||
|
$idParts = explode(',', $id);
|
||||||
|
$id = $idParts[0];
|
||||||
|
}
|
||||||
|
|
||||||
if (filter_var($id, FILTER_VALIDATE_URL) !== false) {
|
if (filter_var($id, FILTER_VALIDATE_URL) !== false) {
|
||||||
$toRemove = [];
|
$toRemove = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user