From a7fcb77d1b1b4988da413bde54e3139ca2445ab7 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 27 Nov 2017 18:05:47 +0100 Subject: [PATCH] Fix error Call to a member function setDate() on boolean --- api/src/Etemplate/Widget/Date.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Date.php b/api/src/Etemplate/Widget/Date.php index 7efad0bccd..3e070dd230 100644 --- a/api/src/Etemplate/Widget/Date.php +++ b/api/src/Etemplate/Widget/Date.php @@ -115,7 +115,7 @@ class Date extends Transformer { $date = new Api\DateTime($value); } - if($this->type == 'date-timeonly') + if($this->type == 'date-timeonly' && $date) { $date->setDate(1970, 1, 1); }