Skip to content

Commit

Permalink
Added a check for ZSET values (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
SachinBahukhandi authored Apr 10, 2024
1 parent c7229f0 commit 0303c81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
}

// ZSet
else if (($_POST['type'] == 'zset') && isset($_POST['score'])) {
else if (($_POST['type'] == 'zset') && isset($_POST['score']) && is_numeric($_POST['score'])) {
// The only way to edit a ZSet value is to add it and remove the old value.
$redis->zRem($key, encodeOrDecode('save', $key, input_convert($_POST['oldvalue'])));
$redis->zAdd($key, input_convert($_POST['score']), $value);
Expand Down

0 comments on commit 0303c81

Please sign in to comment.