Skip to content

Commit 2c034cf

Browse files
committed
Replace FILTER_VALIDATE_BOOLEAN by FILTER_VALIDATE_BOOL
1 parent b1ba36e commit 2c034cf

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

ParameterBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function getInt(string $key, int $default = 0): int
138138
*/
139139
public function getBoolean(string $key, bool $default = false): bool
140140
{
141-
return $this->filter($key, $default, \FILTER_VALIDATE_BOOLEAN);
141+
return $this->filter($key, $default, \FILTER_VALIDATE_BOOL);
142142
}
143143

144144
/**

Session/Storage/Handler/AbstractSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function write(string $sessionId, string $data): bool
8686

8787
public function destroy(string $sessionId): bool
8888
{
89-
if (!headers_sent() && filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) {
89+
if (!headers_sent() && filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL)) {
9090
if (!isset($this->sessionName)) {
9191
throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class));
9292
}

Session/Storage/Handler/PdoSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ protected function doRead(string $sessionId): string
593593
throw new \RuntimeException('Failed to read session: INSERT reported a duplicate id but next SELECT did not return any data.');
594594
}
595595

596-
if (!filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) {
596+
if (!filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOL) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) {
597597
// In strict mode, session fixation is not possible: new sessions always start with a unique
598598
// random id, so that concurrency is not possible and this code path can be skipped.
599599
// Exclusive-reading of non-existent rows does not block, so we need to do an insert to block

Session/Storage/NativeSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function start(): bool
128128
throw new \RuntimeException('Failed to start the session: already started by PHP.');
129129
}
130130

131-
if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file, $line)) {
131+
if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL) && headers_sent($file, $line)) {
132132
throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line));
133133
}
134134

Tests/Fixtures/response-functional/common.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ error_reporting(-1);
2222
ini_set('html_errors', 0);
2323
ini_set('display_errors', 1);
2424

25-
if (filter_var(ini_get('xdebug.default_enable'), FILTER_VALIDATE_BOOLEAN)) {
25+
if (filter_var(ini_get('xdebug.default_enable'), FILTER_VALIDATE_BOOL)) {
2626
xdebug_disable();
2727
}
2828

Tests/Session/Storage/Handler/PdoSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function testReadConvertsStreamToString()
147147

148148
public function testReadLockedConvertsStreamToString()
149149
{
150-
if (filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN)) {
150+
if (filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOL)) {
151151
$this->markTestSkipped('Strict mode needs no locking for new sessions.');
152152
}
153153

0 commit comments

Comments
 (0)