used ltrim() for removing (any) trailing space
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
b97561e0c4
commit
fda99e39c1
12
boot.php
12
boot.php
|
@ -695,18 +695,14 @@ class App {
|
||||||
|
|
||||||
if ((x($_SERVER, 'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'], 0, 9) === "pagename=") {
|
if ((x($_SERVER, 'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'], 0, 9) === "pagename=") {
|
||||||
$this->query_string = substr($_SERVER['QUERY_STRING'], 9);
|
$this->query_string = substr($_SERVER['QUERY_STRING'], 9);
|
||||||
|
|
||||||
// removing trailing / - maybe a nginx problem
|
// removing trailing / - maybe a nginx problem
|
||||||
/// @TODO can be shortened by trim($str, '/') !
|
$this->query_string = lrim($this->query_string, '/');
|
||||||
if (substr($this->query_string, 0, 1) == "/") {
|
|
||||||
$this->query_string = substr($this->query_string, 1);
|
|
||||||
}
|
|
||||||
} elseif ((x($_SERVER, 'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'], 0, 2) === "q=") {
|
} elseif ((x($_SERVER, 'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'], 0, 2) === "q=") {
|
||||||
$this->query_string = substr($_SERVER['QUERY_STRING'],2);
|
$this->query_string = substr($_SERVER['QUERY_STRING'],2);
|
||||||
|
|
||||||
// removing trailing / - maybe a nginx problem
|
// removing trailing / - maybe a nginx problem
|
||||||
/// @TODO can be shortened by trim($str, '/') !
|
$this->query_string = lrim($this->query_string, '/');
|
||||||
if (substr($this->query_string, 0, 1) == "/") {
|
|
||||||
$this->query_string = substr($this->query_string, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x($_GET, 'pagename')) {
|
if (x($_GET, 'pagename')) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user