diff options
author | Simon Rettberg | 2016-06-09 16:06:07 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-06-09 16:06:32 +0200 |
commit | ab546fefa2b7e8339d35585aa55da30ce6bece1d (patch) | |
tree | 7a255b93492628efaba944bf00fb09cfbed24206 /inc | |
parent | fixed some minor things. (diff) | |
download | slx-admin-ab546fefa2b7e8339d35585aa55da30ce6bece1d.tar.gz slx-admin-ab546fefa2b7e8339d35585aa55da30ce6bece1d.tar.xz slx-admin-ab546fefa2b7e8339d35585aa55da30ce6bece1d.zip |
[dictionary] Handle case where we have no Page
Diffstat (limited to 'inc')
-rw-r--r-- | inc/dictionary.inc.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php index 6ae8fb9b..01651b88 100644 --- a/inc/dictionary.inc.php +++ b/inc/dictionary.inc.php @@ -79,7 +79,8 @@ class Dictionary public static function translateFile($path, $tag) { - // TODO: Handle case where we have no active module/no page class + if (!class_exists('Page') || Page::getModule() === false) + return false; // We have no page - return false for now, as we're most likely running in api or install mode return self::translateFileModule(Page::getModule()->getIdentifier(), $path, $tag); } |