From 9231746d099823232f9d53750723668c3514e53d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 25 Feb 2016 18:07:29 +0100 Subject: [PATCH] functions.php: failsafe method initialization This avoids collisions for modules not using the fake bootstrap in our current tests. Can be removed once we fixed that. --- library/Icinga/Application/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Application/functions.php b/library/Icinga/Application/functions.php index 48b5a7cdf..6144c729b 100644 --- a/library/Icinga/Application/functions.php +++ b/library/Icinga/Application/functions.php @@ -3,7 +3,6 @@ use Icinga\Util\Translator; - /** * No-op translate * @@ -19,6 +18,11 @@ function N_($messageId) return $messageId; } +// Workaround for test issues, this is required unless our tests are able to +// accomplish "real" bootstrapping +if (function_exists('t')) { + return; +} if (extension_loaded('gettext')) {