Check for null values when setting a protocol processor instance for a connection.

This commit is contained in:
Daniele Alessandri
2011-02-15 18:05:02 +01:00
parent 2b2ca8e8dc
commit 784b33358d
+3
View File
@@ -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;
}