Skip to content

Commit

Permalink
Merge pull request #24 from JaroslawZielinski/feature/verses-fixes
Browse files Browse the repository at this point in the history
Verses fixes cd.
  • Loading branch information
JaroslawZielinski authored Aug 20, 2024
2 parents f3d2f36 + d799d9e commit a6b5ffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bible/Torah/SiglumFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a6b5ffd

Please sign in to comment.