Skip to content

Fatal error on php 7 with yii/redis/Session enable #41

@JackyChan

Description

@JackyChan

Redis return null if the key is missing, but readSession method must return string, otherwise session would close. So readSession($id) should changed like this ?

$data = $this->redis->executeCommand('GET', [$this->calculateKey($id)]);

return $data === false || $data === null ? '' : $data;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions