From 86f577aff6640077377129ddd6cfd1fa74dc86ac Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Mon, 20 Jul 2015 17:00:38 -0500 Subject: [PATCH] Minor - Add check on existence of parent language path - refs BT#9880 #TMI --- main/inc/lib/plugin.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main/inc/lib/plugin.class.php b/main/inc/lib/plugin.class.php index 804e9eeadd..6e008a6fcb 100755 --- a/main/inc/lib/plugin.class.php +++ b/main/inc/lib/plugin.class.php @@ -342,11 +342,14 @@ class Plugin $languageParentInfo = api_get_language_info($languageParentId); $languageParentFolder = $languageParentInfo['dokeos_folder']; - include "{$root}{$plugin_name}/lang/{$languageParentFolder}.php"; + $parentPath = "{$root}{$plugin_name}/lang/{$languageParentFolder}.php"; + if (is_readable($parentPath)) { + include $parentPath; - if (!empty($strings)) { - foreach ($strings as $key => $string) { - $this->strings[$key] = $string; + if (!empty($strings)) { + foreach ($strings as $key => $string) { + $this->strings[$key] = $string; + } } } }