mirror of
https://github.com/friendica/friendica
synced 2025-04-23 05:50:11 +00:00
Improve dba::selectFirst calls
- Fix remaining $r[0] references - Rename $r to meaningful names
This commit is contained in:
parent
465e1d6a5c
commit
5fc4927764
29 changed files with 228 additions and 250 deletions
|
@ -109,10 +109,10 @@ class Cache
|
|||
// Frequently clear cache
|
||||
self::clear();
|
||||
|
||||
$r = dba::selectFirst('cache', ['v'], ['k' => $key]);
|
||||
$cache = dba::selectFirst('cache', ['v'], ['k' => $key]);
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
$cached = $r['v'];
|
||||
if (DBM::is_result($cache)) {
|
||||
$cached = $cache['v'];
|
||||
$value = @unserialize($cached);
|
||||
|
||||
// Only return a value if the serialized value is valid.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue