Skip to content

Commit edd1dfb

Browse files
committed
Leverage non-capturing catches
1 parent 6f57fbb commit edd1dfb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ private function setPhpDefaultLocale(string $locale): void
18751875
if (class_exists(\Locale::class, false)) {
18761876
\Locale::setDefault($locale);
18771877
}
1878-
} catch (\Exception $e) {
1878+
} catch (\Exception) {
18791879
}
18801880
}
18811881

Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ public function getExpires(): ?\DateTimeInterface
700700
{
701701
try {
702702
return $this->headers->getDate('Expires');
703-
} catch (\RuntimeException $e) {
703+
} catch (\RuntimeException) {
704704
// according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past
705705
return \DateTime::createFromFormat('U', time() - 172800);
706706
}

Session/Storage/Handler/RedisSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function doDestroy(string $sessionId): bool
8282
if ($unlink) {
8383
try {
8484
$unlink = false !== $this->redis->unlink($this->prefix.$sessionId);
85-
} catch (\Throwable $e) {
85+
} catch (\Throwable) {
8686
$unlink = false;
8787
}
8888
}

0 commit comments

Comments
 (0)