mirror of
https://github.com/friendica/friendica
synced 2025-04-24 09:50:11 +00:00
Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
5ff1d431aa
commit
ae1533e312
3 changed files with 6 additions and 11 deletions
|
@ -212,13 +212,10 @@ class Cache
|
|||
return null;
|
||||
}
|
||||
|
||||
switch (true) {
|
||||
// manage array value
|
||||
case preg_match("|^a:[0-9]+:{.*}$|s", $value):
|
||||
return unserialize($value);
|
||||
|
||||
default:
|
||||
return $value;
|
||||
if (preg_match("|^a:[0-9]+:{.*}$|s", $value)) {
|
||||
return unserialize($value);
|
||||
} else {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue