CRM-13823 - Fix converting null to date
authorColeman Watts <coleman@civicrm.org>
Wed, 18 Nov 2015 04:20:09 +0000 (23:20 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 18 Nov 2015 04:20:09 +0000 (23:20 -0500)
CRM/Utils/Check/Env.php

index 42243bed18bd93cf550bdb542f50a067fbd29ad2..bf003ee603e454ccf84cc66d92844ee7a46cd93c 100644 (file)
@@ -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 {