diff --git a/classes/UnreadRecords.php b/classes/UnreadRecords.php index 0dd0b56..ee4f00c 100644 --- a/classes/UnreadRecords.php +++ b/classes/UnreadRecords.php @@ -7,8 +7,11 @@ class UnreadRecords { public static function getTotal() { - $unread = Record::where('unread', 1)->count(); - return ($unread > 0) ? $unread : null; + if (Schema::hasTable('blakejones_magicforms_records')) { + $unread = Record::where('unread', 1)->count(); + } + + return (isset($unread) && $unread > 0) ? $unread : null; } } diff --git a/updates/version.yaml b/updates/version.yaml index c39c876..f97ef72 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -132,4 +132,6 @@ - changed namespace - Added support for October CMS v3 1.6.1: - - Fixes support for Translate v2 [thanks to daftspunk] \ No newline at end of file + - Fixes support for Translate v2 [thanks to daftspunk] +1.6.2: + - Fixed getting total count of records preventing install because the records table doesn't exist \ No newline at end of file