Try to be less clever in redis get method
All checks were successful
Gitea - aviat/banker/pipeline/head This commit looks good
All checks were successful
Gitea - aviat/banker/pipeline/head This commit looks good
This commit is contained in:
parent
a1279b2980
commit
73e646da5a
@ -28,7 +28,7 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">= 8",
|
"php": ">= 8",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"predis/predis": "^v1.1.10",
|
"predis/predis": "^v2.1.2",
|
||||||
"psr/log": "^1.1.0 || ^3.0.0",
|
"psr/log": "^1.1.0 || ^3.0.0",
|
||||||
"psr/cache": "^3.0.0",
|
"psr/cache": "^3.0.0",
|
||||||
"psr/simple-cache": "^3.0.0"
|
"psr/simple-cache": "^3.0.0"
|
||||||
|
@ -79,10 +79,7 @@ class RedisDriver extends AbstractDriver {
|
|||||||
public function get(string $key): mixed
|
public function get(string $key): mixed
|
||||||
{
|
{
|
||||||
$raw = $this->conn->get($key) ?? '';
|
$raw = $this->conn->get($key) ?? '';
|
||||||
$parsed = @unserialize($raw);
|
return unserialize($raw);
|
||||||
$hasError = is_array(error_get_last());
|
|
||||||
|
|
||||||
return ($hasError) ? NULL : $parsed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user