Skip to content

Commit 53d6b4f

Browse files
committed
Resolves cheprasov#81 - Add optional param values to linsert
This is more just a quick fix to resolve issue cheprasov#81. Really, $after should be at the end of the argument list (as $pivot and $value should always have arguments) or $after shouldn't have a default value, but both of those changes would break backward compatibility.
1 parent d991b67 commit 53d6b4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RedisClient/Command/Traits/Version2x6/ListsCommandsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function lindex($key, $index) {
9191
* @return int The length of the list after the insert operation,
9292
* or -1 when the value pivot was not found. Or 0 when key was not found.
9393
*/
94-
public function linsert($key, $after = true, $pivot, $value) {
94+
public function linsert($key, $after = true, $pivot = '', $value = '') {
9595
return $this->returnCommand(['LINSERT'], $key, [$key, $after ? 'AFTER' : 'BEFORE', $pivot, $value]);
9696
}
9797

0 commit comments

Comments
 (0)