We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6591a2 commit 2d1cae6Copy full SHA for 2d1cae6
classes/Translate.php
@@ -165,11 +165,13 @@ public function load_translation($language = null) {
165
elseif (file_exists(modules_path.'/'.module.'/lang/English.lang'))
166
$path = modules_path.'/'.module.'/lang/English.lang';
167
168
- $file = file_get_contents($path);
+ $file = @file_get_contents($path);
169
170
// Error?
171
- if ($file === false)
172
- trigger_error("Failed to open translation file: $path", FATAL);
+ if ($file === false) {
+ trigger_error("Failed to open translation file: $path", ERROR);
173
+ return false;
174
+ }
175
176
// Parse the file
177
foreach (preg_split('/\n(?=\S)/', $file) as $group) {
0 commit comments