From 6f16e928e4d94b4f29e4bed3f8041c0108f75c7b Mon Sep 17 00:00:00 2001 From: Sidney Souza Date: Wed, 30 Oct 2019 12:58:18 -0300 Subject: [PATCH] fix: Tag::updateContainerTag setting a wrong startDate and endDate value When we do a tag update startDate and endDate is submitted as a empty string that is converted to 0000-00-00 00:00:00 on database. That conversion cause an ExceptionInvalidDateBeforeFirstWebsite exception when We try to update tags again or publish a new version broken the whole tagmanager plugin --- Model/Tag.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/Tag.php b/Model/Tag.php index a30b47ae..c848acc1 100644 --- a/Model/Tag.php +++ b/Model/Tag.php @@ -145,8 +145,8 @@ public function updateContainerTag($idSite, $idContainerVersion, $idTag, $name, 'fire_limit' => $fireLimit, 'fire_delay' => $fireDelay, 'priority' => $priority, - 'start_date' => $startDate, - 'end_date' => $endDate + 'start_date' => empty($startDate) ? null : $startDate, + 'end_date' => empty($endDate) ? null : $endDate, ); $this->updateTagColumns($idSite, $idContainerVersion, $idTag, $columns); }