]> BookStack Code Mirror - bookstack/commit
Fixed issue with translation loading without theme
authorDan Brown <redacted>
Sat, 3 Jul 2021 10:53:46 +0000 (11:53 +0100)
committerDan Brown <redacted>
Sat, 3 Jul 2021 10:53:46 +0000 (11:53 +0100)
commit4da72aa267903dcb448fe15dd5637391a3f440e8
tree2b3c1552f2f532fa9a7c05e12da0478c1f1073b7
parent3dda622f0a6e0446e2fdb02b64ce88701f42f609
Fixed issue with translation loading without theme

System was using the empty state return from theme_path,
when no theme was configured, for loading in languages
which would result in the root path being looked up upon.

This changes the theme_path helper to return null in cases a theme
is not configured instead of empty string to help prevent assumed
return path will be legitimate, and to help enforce error case
handling.

For #2836
app/Theming/ThemeService.php
app/Translation/FileLoader.php
app/helpers.php