summaryrefslogtreecommitdiffstats
path: root/inc/dictionary.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/dictionary.inc.php')
-rw-r--r--inc/dictionary.inc.php3
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);
}