mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix default value
This commit is contained in:
@@ -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}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user