avoid passing null (updated) to strtotime()
authorleon <leon@roojs.com>
Thu, 4 Aug 2022 09:25:28 +0000 (17:25 +0800)
committerleon <leon@roojs.com>
Thu, 4 Aug 2022 09:25:28 +0000 (17:25 +0800)
DataObjects/Core_template.php

index 1c44026..f19deaf 100644 (file)
@@ -500,7 +500,7 @@ WHERE (
         
         // do we need to compile the file..
         $ts = DB_DataObject::Factory('core_templatestr');
-        $ts->selectAdd('MAX(updated) as updated');
+        $ts->selectAdd('COALESCE(MAX(updated), "1000-01-01") as updated');
         $ts->lang = $lang;
         $ts->template_id = $d->id;
         if (!$ts->find(true)) {