From 0296367d061d692c18bee67f7c709ee47c0d12cf Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 17 Nov 2015 23:20:09 -0500 Subject: [PATCH] CRM-13823 - Fix converting null to date --- CRM/Utils/Check/Env.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/Check/Env.php b/CRM/Utils/Check/Env.php index 42243bed18..bf003ee603 100644 --- a/CRM/Utils/Check/Env.php +++ b/CRM/Utils/Check/Env.php @@ -241,8 +241,8 @@ class CRM_Utils_Check_Env { $statusPreference->domain_id = CRM_Core_Config::domainID(); $statusPreference->name = 'checkLastCron'; - if ($statusPreference->find(TRUE)) { - $lastCron = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_StatusPreference', $statusPreference->id, 'check_info'); + if ($statusPreference->find(TRUE) && !empty($statusPreference->check_info)) { + $lastCron = $statusPreference->check_info; $msg = ts('Last cron run at %1.', array(1 => CRM_Utils_Date::customFormat(date('c', $lastCron)))); } else { -- 2.25.1