Skip to content

Commit

Permalink
Additional option exception checks
Browse files Browse the repository at this point in the history
  • Loading branch information
splorp committed Jul 15, 2022
1 parent 166e2ff commit ba39423
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
$includeChildren = option('splorp.paperback-export.includeChildren', []);
$excludeTemplate = option('splorp.paperback-export.excludeTemplate', []);

if (! is_string($prefix)) {
throw new Exception('The option “splorp.paperback-export.prefix” must be a string.');
}
if (! is_bool($includeUnlisted)) {
throw new Exception('The option “splorp.paperback-export.includeUnlisted” must be a boolean.');
}
if (! is_array($includeChildren)) {
throw new Exception('The option "splorp.paperback-export.includeChildren" must be an array.');
throw new Exception('The option splorp.paperback-export.includeChildren must be an array.');
}
if (! is_array($excludeTemplate)) {
throw new Exception('The option "splorp.paperback-export.excludeTemplate" must be an array.');
throw new Exception('The option splorp.paperback-export.excludeTemplate must be an array.');
}

$languages = site()->languages();
Expand Down

0 comments on commit ba39423

Please sign in to comment.