Skip to content

Commit

Permalink
Fix #2 : warning on line 153 when no language is configured at all in…
Browse files Browse the repository at this point in the history
… the System > Languages settings
  • Loading branch information
bricebou committed Aug 6, 2022
1 parent 3a4eaea commit 5a7ecd4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions better-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ public function betterTypo(string $string, string $language = null): string

if (!$language) {
$language = $this->grav['page']->language() ?? $this->grav['language']->getLanguage();
if (!$language) {
$language = $this->grav['config']->get('site.default_lang');
}
}

$betterTypoSettings = [];
Expand Down

0 comments on commit 5a7ecd4

Please sign in to comment.