diff --git a/file/lib/system/command/CommandHandler.class.php b/file/lib/system/command/CommandHandler.class.php index ed9e8b1..3c3dbe0 100644 --- a/file/lib/system/command/CommandHandler.class.php +++ b/file/lib/system/command/CommandHandler.class.php @@ -54,14 +54,19 @@ public function __construct($text, \chat\data\room\Room $room = null) { * @return array */ public static function getAliasMap() { - $result = array(); - foreach (explode("\n", StringUtil::unifyNewlines(StringUtil::toLowerCase(CHAT_COMMAND_ALIASES))) as $line) { - list($key, $val) = explode(':', $line, 2); + try { + $result = array(); + foreach (explode("\n", StringUtil::unifyNewlines(StringUtil::toLowerCase(CHAT_COMMAND_ALIASES))) as $line) { + list($key, $val) = explode(':', $line, 2); + + $result[$key] = $val; + } - $result[$key] = $val; + return $result; + } + catch (\wcf\system\exception\SystemException $e) { + throw new \wcf\system\exception\SystemException("Invalid alias specified: '".$line."'"); } - - return $result; } /**