Skip to content

Unsupported operand types: int + string #526

@nadar

Description

@nadar

From time to time sentry logs this error: Unsupported operand types: int + string

Stacktrace:

$payload = $this->redis->hget("$this->channel.messages", $id);
list($ttr, $message) = explode(';', $payload, 2);
$this->redis->zadd("$this->channel.reserved", time() + $ttr, $id);

https://github.com/yiisoft/yii2-queue/blob/master/src/drivers/redis/Queue.php#L160

For whatever reason $ttr seems to be a string instead of an int. Should we maybe typecast $ttr or throw an exception?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions