mirror of
https://github.com/predis/predis.git
synced 2026-10-28 06:35:57 +00:00
Check for null values when setting a protocol processor instance for a connection.
This commit is contained in:
@@ -1278,6 +1278,9 @@ abstract class ConnectionBase implements IConnectionSingle {
|
||||
}
|
||||
|
||||
public function setProtocol(IRedisProtocol $protocol) {
|
||||
if ($protocol === null) {
|
||||
throw new \InvalidArgumentException("The protocol instance cannot be a null value");
|
||||
}
|
||||
$this->_protocol = $protocol;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user