Fix an old but harmless glitch in the serialization of inline commands with 0 arguments.

This commit is contained in:
Daniele Alessandri
2010-05-21 21:10:34 +02:00
parent 40d5b04278
commit e70b8ed38b
+4 -1
View File
@@ -421,7 +421,10 @@ abstract class InlineCommand extends Command {
if (isset($arguments[0]) && is_array($arguments[0])) {
$arguments[0] = implode($arguments[0], ' ');
}
return $command . ' ' . implode($arguments, ' ') . Protocol::NEWLINE;
return $command . (count($arguments) > 0
? ' ' . implode($arguments, ' ') . Protocol::NEWLINE
: Protocol::NEWLINE
);
}
}