From ab546fefa2b7e8339d35585aa55da30ce6bece1d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 9 Jun 2016 16:06:07 +0200 Subject: [dictionary] Handle case where we have no Page --- inc/dictionary.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/dictionary.inc.php') 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); } -- cgit v1.2.3-55-g7522