diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-03-17 12:02:48 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-03-17 12:02:48 +0000 |
commit | 8dfc457858943734f33fd2fb51b492c07b41a4fd (patch) | |
tree | fb094dc3d164f5c5faca9d6eb044f405552d1dd5 /phpBB/includes | |
parent | f522d2b8573e2228ef110ffed41d5fbea816ff9c (diff) | |
download | forums-8dfc457858943734f33fd2fb51b492c07b41a4fd.tar forums-8dfc457858943734f33fd2fb51b492c07b41a4fd.tar.gz forums-8dfc457858943734f33fd2fb51b492c07b41a4fd.tar.bz2 forums-8dfc457858943734f33fd2fb51b492c07b41a4fd.tar.xz forums-8dfc457858943734f33fd2fb51b492c07b41a4fd.zip |
Do not suppress PHP notices/errors in language packs if DEBUG_EXTRA mode enabled. (Bug #41485)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9383 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/session.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index a349eb7e14..49f97f6050 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1534,7 +1534,10 @@ class user extends session // We include common language file here to not load it every time a custom language file is included $lang = &$this->lang; - if ((@include $this->lang_path . $this->lang_name . "/common.$phpEx") === false) + // Do not suppress error if in DEBUG_EXTRA mode + $include_result = (defined('DEBUG_EXTRA')) ? (include $this->lang_path . $this->lang_name . "/common.$phpEx") : (@include $this->lang_path . $this->lang_name . "/common.$phpEx"); + + if ($include_result === false) { die('Language file ' . $this->lang_path . $this->lang_name . "/common.$phpEx" . " couldn't be opened."); } @@ -2008,7 +2011,10 @@ class user extends session $language_filename = $this->lang_path . $this->lang_name . '/' . (($use_help) ? 'help_' : '') . $lang_file . '.' . $phpEx; } - if ((@include $language_filename) === false) + // Do not suppress error if in DEBUG_EXTRA mode + $include_result = (defined('DEBUG_EXTRA')) ? (include $language_filename) : (@include $language_filename); + + if ($include_result === false) { trigger_error('Language file ' . $language_filename . ' couldn\'t be opened.', E_USER_ERROR); } |