From 24c47bbd53e8b7ae7df8211b07dd0acabfada4da Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Thu, 15 Oct 2020 21:57:57 +0200 Subject: [PATCH] Fix potential incorrect link building --- common_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_config.php b/common_config.php index 0feca52..9222f7d 100644 --- a/common_config.php +++ b/common_config.php @@ -69,7 +69,7 @@ if($language!=='en'){ function print_langs(){ global $I, $L; echo "$I[language]: "; - $query=preg_replace('/(&?lang=[a-z_\-]*)/i', '', $_SERVER['QUERY_STRING']); + $query=ltrim(preg_replace('/&?lang=[a-z_\-]*/i', '', $_SERVER['QUERY_STRING']), '&'); foreach($L as $code=>$name){ if($query===''){ $uri="?lang=$code";