diff --git a/include/utils/utils.php b/include/utils/utils.php index ad9ec269eaccfb49cd29c2a59c82a940037285ee..038f04c678aabeb425bab5fe391b561f113945c5 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); } } diff --git a/modules/Vtiger/views/Basic.php b/modules/Vtiger/views/Basic.php index f373715595a2795674ab36040934f5736bf06453..aff63cb2b799ed3c352b14c6eed22ca12d198fab 100644 --- a/modules/Vtiger/views/Basic.php +++ b/modules/Vtiger/views/Basic.php @@ -55,7 +55,7 @@ abstract class Vtiger_Basic_View extends Vtiger_Footer_View { foreach ($menuGroupedByParent as $parentCategory => $menuList) { if($parentCategory == 'ANALYTICS' || $parentCategory == 'SETTINGS') continue; - if(count($menuList) > 0) { + if(!empty($menuList)) { if(array_key_exists($selectedModule, $menuList) && ($parentCategory == $parentApp)) { $moduleFound = true; $selectedModuleMenuCategory = $parentCategory;