From 1ac5dee689382ca9685d6f450bbd2e5c7c9f71b1 Mon Sep 17 00:00:00 2001
From: Daniel Voelskow <daniel.voelskow@interface-projects.de>
Date: Mon, 8 Jun 2020 13:08:56 +0200
Subject: [PATCH] reduce php72 warnings and set correct brace on Util.php

---
 include/utils/utils.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/utils/utils.php b/include/utils/utils.php
index ad9ec269e..038f04c67 100755
--- a/include/utils/utils.php
+++ b/include/utils/utils.php
@@ -1827,7 +1827,7 @@ function getValidDBInsertDateTimeValue($value) {
 	$value = trim($value);
 	$valueList = explode(' ',$value);
     //checking array count = 3 if datatime format is 12hr.
-	if(count($valueList) == 2 || count($valueList) == 3) {
+	if(is_array($valueList) && (count($valueList) == 2 || count($valueList) == 3)) {
 		$dbDateValue = getValidDBInsertDateValue($valueList[0]);
 		$dbTimeValue = $valueList[1];
 		if(!empty($dbTimeValue) && strpos($dbTimeValue, ':') === false) {
@@ -1843,7 +1843,7 @@ function getValidDBInsertDateTimeValue($value) {
 		} catch (Exception $ex) {
 			return '';
 		}
-	} elseif(count($valueList == 1)) {
+	} elseif(is_array($valueList) && count($valueList) == 1) {
 		return getValidDBInsertDateValue($value);
 	}
 }
-- 
GitLab