Commit 2b2884a0 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

fix syntax for PHP7.

parent 350d6fd8
......@@ -23,10 +23,10 @@ function get_pref_language_array($str_http_languages)
}
else {
// On récupère l'indice q
$q = preg_replace('.*;q=(.*)', '\\1', $lang);
$q = preg_replace('~.*;q=(.*)~', '\\1', $lang);
if ($q > $qcandidat) {
$candidat = preg_replace('(.*);.*', '\\1', $lang); ;
$candidat = preg_replace('~(.*);.*~', '\\1', $lang); ;
$qcandidat = $q;
$indicecandidat = $j;
}
......@@ -50,7 +50,7 @@ function get_language()
foreach ($array as $i)
{
$tmp = explode ("=", $i);
$$tmp[0] = $tmp[1];
${$tmp[0]} = $tmp[1];
}
if (isSet($lang))
$preflang = array(0 => $lang);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment