From 9bca8f400e840e603fd84bd5c428d43553996c4b Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Wed, 9 Aug 2023 16:31:03 +0200 Subject: [PATCH] Add lowercase ndb/adb to list of readable noda repository names --- src/enums/MDNodaRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/enums/MDNodaRepository.php b/src/enums/MDNodaRepository.php index b162b33..ab5220a 100644 --- a/src/enums/MDNodaRepository.php +++ b/src/enums/MDNodaRepository.php @@ -72,6 +72,7 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { 'MBL' => self::mbl, 'mindat.org' => self::mindatorg, 'moebeltypologie' => self::moebeltypologie, + 'ndb/adb' => self::ndb_adb, 'NDB/ADB' => self::ndb_adb, 'ndl' => self::ndl, 'ndp-ikmk' => self::ndp_ikmk, @@ -364,7 +365,7 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { else if (substr($id, 0, 1) === 'n') { if (filter_var(trim(substr($id, 1), '0'), FILTER_VALIDATE_INT) === false) return false; } - else throw new MDgenericInvalidInputsException("LOC IDs must start with n or nr or nb"); + else throw new MDgenericInvalidInputsException("LOC IDs must start with n or nr or nb (provided: " . strip_tags($id) . ")"); return (string)$id;