mirror of
https://github.com/predis/predis.git
synced 2026-08-28 11:09:49 +00:00
Fix an old but harmless glitch in the serialization of inline commands with 0 arguments.
This commit is contained in:
+4
-1
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user