8000 zRevRangeByScore limit doesn't accept variable · Issue #906 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content
zRevRangeByScore limit doesn't accept variable #90 7852 6
Closed
@tolew1

Description

@tolew1

I can't for the life of me figure out why this isn't working. I need to pass a variable to the offset of the limit in zRevRangeByScore and it ignores it. The variable is not empty and can be seen with var_dump and print_r.

If I do this

$GLOBALS["redis"]->zRevRangeByScore($key, '+inf' , '-inf' , array('withscores' => TRUE, 'limit' => array(8, 8)));

it works as expected however if I do this

$offset = 8;
$GLOBALS["redis"]->zRevRangeByScore($key, '+inf' , '-inf' , array('withscores' => TRUE, 'limit' => array($offset, 8)));

It returns all values. Something weird is going on. It's really messing things up for me at this point. My code heavily utilizes phpredis, so I can't just change a few things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0