mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-22 21:40:28 +03:00
Bug fix
Properly check file handler before making use of it in common.php
This commit is contained in:
parent
6747e2f557
commit
afa06b21e2
@ -184,7 +184,11 @@ function load_messages($locale)
|
||||
global $messages, $webim_encoding, $output_encoding;
|
||||
$hash = array();
|
||||
$current_encoding = $webim_encoding;
|
||||
|
||||
$fp = fopen(dirname(__FILE__) . "/../locales/$locale/properties", "r");
|
||||
if (!$fp) {
|
||||
die("unable to open properties for locale");
|
||||
}
|
||||
while (!feof($fp)) {
|
||||
$line = fgets($fp, 4096);
|
||||
$keyval = preg_split("/=/", $line, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user