From 083a6a5ceae25afae729debbcd7e45892dd6d74b Mon Sep 17 00:00:00 2001 From: Graham Eades Date: Sat, 27 May 2017 14:50:05 +0100 Subject: [PATCH] Fixed new login with empty records --- backend/php/src/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/php/src/index.php b/backend/php/src/index.php index 9b6ebf7..2fdb5be 100644 --- a/backend/php/src/index.php +++ b/backend/php/src/index.php @@ -409,7 +409,11 @@ error_log("message"); $recordStats["updateDate"] = $record->update_date; $recordsStats[$record->reference] = $recordStats; } - $result["recordsStats"] = $recordsStats; + if ( isset( $recordsStats ) ) { + $result["recordsStats"] = $recordsStats; + } else { + $result["recordsStats"] = NULL; + } $result["statistics"] = $user->statistics; $result["version"] = $user->version;