Skip to content

Commit 969c0ad

Browse files
committed
add warning on set redis cache to null
1 parent 98fb395 commit 969c0ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

resources/lib/UnityRedis.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ public function setCache($object, $key, $data)
3333
} else {
3434
$keyStr = $object;
3535
}
36-
36+
if (is_null($data)) {
37+
UnitySite::errorLog("warning", "setting '$keyStr' to null");
38+
}
3739
$this->client->set($keyStr, serialize($data));
3840
}
3941

0 commit comments

Comments
 (0)