From ea62d4c400dddc389d412ecae26e86156a78b736 Mon Sep 17 00:00:00 2001 From: fparan Date: Fri, 2 Aug 2019 12:29:52 +0800 Subject: [PATCH] #0004097 - fixed module.php create translation --- src/Module.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Module.php b/src/Module.php index 2a9df33..8619dfb 100644 --- a/src/Module.php +++ b/src/Module.php @@ -187,7 +187,10 @@ public function createTranslations($e, $routeMatch) $sm = $e->getApplication()->getServiceManager(); $translator = $sm->get('translator'); - $translator->addTranslationFile('phparray', $transPath); + if (file_exists($transPath)){ + $translator->addTranslationFile('phparray', $transPath); + } + } }