Skip to content

Commit 4e2cb4a

Browse files
HenryVolkmerHenry Volkmer
andauthored
Fix #278: Prevent null parameter on SocketException to avoid PHP 8.4 implicity nullable types deprecation
Co-authored-by: Henry Volkmer <[email protected]>
1 parent efe038d commit 4e2cb4a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Yii Framework 2 redis extension Change Log
44
2.0.21 under development
55
------------------------
66

7+
- Fix #278: Prevent null parameter on SocketException to avoid PHP 8.4 implicity nullable types deprecation (HenryVolkmer)
78
- New #276: Added support for predis (antonshevelev)
89
- New #276: Changed default value of yii\redis\Cache::$forceClusterMode to false (antonshevelev)
910
- New #276: Implemented yii\redis\ConnectionInterface in yii\redis\Connection (antonshevelev)

src/SocketException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* @link https://www.yiiframework.com/
45
* @copyright Copyright (c) 2008 Yii Software LLC
@@ -15,7 +16,7 @@
1516
*/
1617
class SocketException extends Exception
1718
{
18-
public function __construct($message = null, $code = 0, \Exception $previous = null)
19+
public function __construct($message = null, $code = 0, ?\Exception $previous = null)
1920
{
2021
if (!YII_DEBUG) {
2122
$message = preg_replace('~AUTH \S+ \S+~', 'AUTH *** ***', $message);

0 commit comments

Comments
 (0)