mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-23 05:40:30 +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;
|
global $messages, $webim_encoding, $output_encoding;
|
||||||
$hash = array();
|
$hash = array();
|
||||||
$current_encoding = $webim_encoding;
|
$current_encoding = $webim_encoding;
|
||||||
|
|
||||||
$fp = fopen(dirname(__FILE__) . "/../locales/$locale/properties", "r");
|
$fp = fopen(dirname(__FILE__) . "/../locales/$locale/properties", "r");
|
||||||
|
if (!$fp) {
|
||||||
|
die("unable to open properties for locale");
|
||||||
|
}
|
||||||
while (!feof($fp)) {
|
while (!feof($fp)) {
|
||||||
$line = fgets($fp, 4096);
|
$line = fgets($fp, 4096);
|
||||||
$keyval = preg_split("/=/", $line, 2);
|
$keyval = preg_split("/=/", $line, 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user