mirror of
https://github.com/appwrite/appwrite
synced 2026-05-05 22:38:37 +00:00
Fix default value
This commit is contained in:
parent
dd5dd4cc43
commit
4d5d30ba7b
1 changed files with 3 additions and 3 deletions
|
|
@ -117,7 +117,7 @@ class StatsUsageDump extends Action
|
|||
$project = new Document($stats['project'] ?? []);
|
||||
|
||||
$numberOfKeys = !empty($stats['keys']) ? count($stats['keys']) : 0;
|
||||
$receivedAt = $stats['receivedAt'] ?? 'NONE';
|
||||
$receivedAt = $stats['receivedAt'] ?? null;
|
||||
if ($numberOfKeys === 0) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ class StatsUsageDump extends Action
|
|||
$time = null;
|
||||
|
||||
if ($period !== 'inf') {
|
||||
$time = $receivedAt !== 'NONE' ? (new \DateTime($receivedAt))->format($format) : date($format, time());
|
||||
$time = !empty($receivedAt) ? (new \DateTime($receivedAt))->format($format) : date($format, time());
|
||||
}
|
||||
$id = \md5("{$time}_{$period}_{$key}");
|
||||
|
||||
|
|
@ -204,7 +204,7 @@ class StatsUsageDump extends Action
|
|||
$time = null;
|
||||
|
||||
if ($period !== 'inf') {
|
||||
$time = $receivedAt !== 'NONE' ? (new \DateTime($receivedAt))->format($format) : date($format, time());
|
||||
$time = !empty($receivedAt) ? (new \DateTime($receivedAt))->format($format) : date($format, time());
|
||||
}
|
||||
$id = \md5("{$time}_{$period}_{$key}");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue