From afa06b21e2ff0be77c964bb7f63bf3215bb48d27 Mon Sep 17 00:00:00 2001 From: "Fedor A. Fetisov" Date: Fri, 13 Sep 2013 14:32:42 +0400 Subject: [PATCH] Bug fix Properly check file handler before making use of it in common.php --- src/messenger/webim/libs/common.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index 97525391..da70e714 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -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);