@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if (!preg_match('//u', urldecode($uri))) { |
90 | 90 | $uri = preg_replace_callback( |
91 | 91 | '/[\x80-\xFF]+/', |
92 | - function ($m) { |
|
92 | + function($m) { |
|
93 | 93 | return urlencode($m[0]); |
94 | 94 | }, |
95 | 95 | $uri |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $uri = preg_replace_callback( |
99 | 99 | '/(?:%[89A-F][0-9A-F])+/i', |
100 | - function ($m) { |
|
100 | + function($m) { |
|
101 | 101 | return urlencode(UTF8::encode('UTF-8', urldecode($m[0]))); |
102 | 102 | }, |
103 | 103 | $uri |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | // Use ob_start() to buffer content and avoid problem of headers already sent... |
108 | 108 | if (headers_sent() === false) { |
109 | 109 | $severProtocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1'); |
110 | - header($severProtocol . ' 301 Moved Permanently'); |
|
111 | - header('Location: ' . $uri); |
|
110 | + header($severProtocol.' 301 Moved Permanently'); |
|
111 | + header('Location: '.$uri); |
|
112 | 112 | exit(); |
113 | 113 | } |
114 | 114 | } |