Skip to content

A free open source IT asset/license management system

Avoids potential error when alerts table is empty

Nathan Taylord4b73b4fb984
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index 664c8edc62..ca85459b67 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -19,7 +19,7 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
- if(Setting::getSettings()->alerts_enabled === 1) {
+ if(Setting::getSettings()?->alerts_enabled === 1) {
$schedule->command('snipeit:inventory-alerts')->daily();
$schedule->command('snipeit:expiring-alerts')->daily();
$schedule->command('snipeit:expected-checkin')->daily();