mirror of
https://github.com/predis/predis.git
synced 2026-09-15 04:47:01 +00:00
Fixed E_NOTICE messages in Predis\RedisServerProfile::createCommand on undefined commands.
This commit is contained in:
+2
-4
@@ -783,12 +783,10 @@ abstract class RedisServerProfile {
|
||||
}
|
||||
|
||||
public function createCommand($method, $arguments = array()) {
|
||||
$commandClass = $this->_registeredCommands[$method];
|
||||
|
||||
if ($commandClass === null) {
|
||||
if (!isset($this->_registeredCommands[$method])) {
|
||||
throw new ClientException("'$method' is not a registered Redis command");
|
||||
}
|
||||
|
||||
$commandClass = $this->_registeredCommands[$method];
|
||||
$command = new $commandClass();
|
||||
$command->setArgumentsArray($arguments);
|
||||
return $command;
|
||||
|
||||
Reference in New Issue
Block a user