fix bug when index == 0
This commit is contained in:
parent
41ac89ec13
commit
bebeb21c3b
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user