From a21b4f177d97eb93434edfebaa5990fda0ea9f48 Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 8 Sep 2014 11:48:18 -0400 Subject: [PATCH] Fixed a bug where we weren't checking if a variable was empty before using it --- airtime_mvc/application/services/SchedulerService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airtime_mvc/application/services/SchedulerService.php b/airtime_mvc/application/services/SchedulerService.php index a31bd380a..f3b3a009c 100644 --- a/airtime_mvc/application/services/SchedulerService.php +++ b/airtime_mvc/application/services/SchedulerService.php @@ -183,6 +183,9 @@ class Application_Service_SchedulerService ->limit(1) ->findOne(); + if (is_null($showInstanceWithMostRecentSchedule)) { + return null; + } $instanceId = $showInstanceWithMostRecentSchedule->getDbId(); }