Skip to content

Commit dfa9fd2

Browse files
committed
Merge branch 'v1.x' into v2.x
2 parents 02a5f6d + 72a9626 commit dfa9fd2

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

Main.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected function buildWebArguments(RouterInterface $router): void
117117
protected function isJsonRequest(): bool
118118
{
119119
return isset($_SERVER['CONTENT_TYPE'])
120-
&& stripos((string)$_SERVER['CONTENT_TYPE'], 'application/json') !== false;
120+
&& stripos($_SERVER['CONTENT_TYPE'], 'application/json') !== false;
121121
}
122122

123123
protected function buildInitialArguments(RouterInterface $router): void

Router/Router.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ private function getFilteredMethodName(string $methodName): string
912912
*/
913913
protected function getCurrentRequestMethod(): string
914914
{
915-
return !empty($_SERVER['REQUEST_METHOD']) ? (string)$_SERVER['REQUEST_METHOD'] : RequestMethod::GET->value;
915+
return !empty($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : RequestMethod::GET->value;
916916
}
917917

918918
}

Session/Session.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,17 @@ public function __construct(ConfigInterface $config)
6565
/** @var bool $strictIp */
6666
$strictIp = $config->getSetting('session.strictIp', false);
6767
if ($strictIp) {
68-
if (isset($Feast->ipAddress) && $Feast->ipAddress !== (string)$_SERVER['REMOTE_ADDR']) {
68+
/** @psalm-suppress PossiblyUndefinedArrayOffset */
69+
if (isset($Feast->ipAddress) && $Feast->ipAddress !== $_SERVER['REMOTE_ADDR']) {
6970
session_destroy();
7071
$response = di(ResponseInterface::class);
7172

72-
$response->redirect((string)$_SERVER['REQUEST_URI']);
73+
/** @psalm-suppress PossiblyUndefinedArrayOffset */
74+
$response->redirect($_SERVER['REQUEST_URI']);
7375
}
7476
}
75-
$Feast->ipAddress = (string)$_SERVER['REMOTE_ADDR'];
77+
/** @psalm-suppress PossiblyUndefinedArrayOffset */
78+
$Feast->ipAddress = $_SERVER['REMOTE_ADDR'];
7679
}
7780

7881
/**

composer.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)