aboutsummaryrefslogtreecommitdiffstats
path: root/langs.inc.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-10-16 16:18:56 +0000
committerRomain d'Alverny <rda@mageia.org>2012-10-16 16:18:56 +0000
commitf2d890ff94879edf502d235dd49e053e51b5e3a7 (patch)
treeb56009a78a92536a1f438936faf94e9365a72e9e /langs.inc.php
parentf108e8c24c68c9d7bd440bcfb29e09b7edbf1ad7 (diff)
downloadwww-f2d890ff94879edf502d235dd49e053e51b5e3a7.tar
www-f2d890ff94879edf502d235dd49e053e51b5e3a7.tar.gz
www-f2d890ff94879edf502d235dd49e053e51b5e3a7.tar.bz2
www-f2d890ff94879edf502d235dd49e053e51b5e3a7.tar.xz
www-f2d890ff94879edf502d235dd49e053e51b5e3a7.zip
warning fix
Diffstat (limited to 'langs.inc.php')
-rw-r--r--langs.inc.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/langs.inc.php b/langs.inc.php
index e39afa3f9..23a207367 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -51,7 +51,7 @@ $domains_lang = array(
* Only manages redirections to main home path.
*
* @param string $tld
- * @param array $domains_lang
+ * @param array $domains_lang
* @param string $vhost
*
* @return void
@@ -66,7 +66,7 @@ function tld_redirect($tld, $domains_lang, $vhost)
* Only manages redirections to main home path.
*
* @param string $host
- * @param array $domains_lang
+ * @param array $domains_lang
* @param string $vhost
*
* @return void
@@ -214,19 +214,23 @@ function _h($s, $args = null, $tag = 'p') {
function _lang_return($file)
{
$strings = array();
- $f = file($file);
- foreach ($f as $k => $v) {
+ if (file_exists($file)) {
+ $f = file($file);
- $C = substr($v, 0, 1);
- if ($C === '#') continue;
+ foreach ($f as $k => $v) {
- if ($C === ';' && !empty($f[$k+1])) {
- $j = trim(substr($v, 1));
- $j = str_replace(array("\'", "\""), array("'", '"'), $j);
- $strings[$j] = trim($f[$k+1]);
+ $C = substr($v, 0, 1);
+ if ($C === '#') continue;
+
+ if ($C === ';' && !empty($f[$k+1])) {
+ $j = trim(substr($v, 1));
+ $j = str_replace(array("\'", "\""), array("'", '"'), $j);
+ $strings[$j] = trim($f[$k+1]);
+ }
}
}
+
return $strings;
}