fix bug when index == 0

This commit is contained in:
François Poulain 2016-11-11 22:17:50 +01:00 committed by root
parent 41ac89ec13
commit bebeb21c3b

View File

@ -42,7 +42,7 @@ function url_translate ($url, $to) {
$name= basename ($url);
$index= array_search ($name, $registered_languages[$from]['pages']);
if (!$index)
if ($index === false)
return $registered_languages[$to]['loc'];
return $registered_languages[$to]['loc'] . $registered_languages[$to]['pages'][$index];
}