mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix coding standards and save a function call.
This commit is contained in:
parent
acc6a2645f
commit
773666ddad
2 changed files with 3 additions and 2 deletions
|
@ -232,7 +232,8 @@ class CakeRequest implements ArrayAccess {
|
|||
} elseif (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '://') === false) {
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
} elseif (isset($_SERVER['REQUEST_URI'])) {
|
||||
if (strpos($_SERVER['REQUEST_URI'], '?') !== false && strpos($_SERVER['REQUEST_URI'], '://') > strpos($_SERVER['REQUEST_URI'], '?')) {
|
||||
$qPosition = strpos($_SERVER['REQUEST_URI'], '?');
|
||||
if ($qPosition !== false && strpos($_SERVER['REQUEST_URI'], '://') > $qPosition) {
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
} else {
|
||||
$uri = substr($_SERVER['REQUEST_URI'], strlen(FULL_BASE_URL));
|
||||
|
|
|
@ -141,7 +141,7 @@ class CakeRequestTest extends CakeTestCase {
|
|||
$request = new CakeRequest();
|
||||
$this->assertEquals('some/path', $request->url);
|
||||
|
||||
$_SERVER['REQUEST_URI'] = FULL_BASE_URL.'/other/path?url=http://cakephp.org';
|
||||
$_SERVER['REQUEST_URI'] = FULL_BASE_URL . '/other/path?url=http://cakephp.org';
|
||||
$request = new CakeRequest();
|
||||
$this->assertEquals('other/path', $request->url);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue