浏览代码

Ensure that commands are registered in server profiles using lowercase aliases.

Daniele Alessandri 13 年之前
父节点
当前提交
68dba4cb12
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/Predis/Profiles/ServerProfile.php

+ 1 - 1
lib/Predis/Profiles/ServerProfile.php

@@ -99,7 +99,7 @@ abstract class ServerProfile implements IServerProfile, IProcessingSupport {
         if (!$commandReflection->isSubclassOf('\Predis\Commands\ICommand')) {
             throw new ClientException("Cannot register '$command' as it is not a valid Redis command");
         }
-        $this->_registeredCommands[$alias] = $command;
+        $this->_registeredCommands[strtolower($alias)] = $command;
     }
 
     public function setProcessor(ICommandProcessor $processor) {