From d799d9ea8744af0265944fa919f483e532957120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Zieli=C5=84ski?= Date: Tue, 20 Aug 2024 09:03:43 +0200 Subject: [PATCH] Verses fixes cd. --- src/Bible/Torah/SiglumFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bible/Torah/SiglumFactory.php b/src/Bible/Torah/SiglumFactory.php index aa06b9e..829f7b7 100755 --- a/src/Bible/Torah/SiglumFactory.php +++ b/src/Bible/Torah/SiglumFactory.php @@ -44,7 +44,7 @@ public static function createFromString(string $siglum): Siglum $book = $siglumArray[1] ?? null; $chapter = $siglumArray[2] ?? null; $verses = $siglumArray[3] ?? null; - if (empty($translation) || empty($book) || empty($chapter) || empty($verses)) { + if (empty($translation) || empty($book) || ('0' !== $chapter && empty($chapter)) || empty($verses)) { throw new \Exception('Siglum format is not valid.'); } return self::create($translation, $book, $chapter, $verses);