From 12e9e453d8f9fc5c0db99b2536ae1b33d1eff576 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Tue, 2 Oct 2018 14:57:51 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B01644=20Fix=20PHP=207.2=20compatibility?= =?UTF-8?q?=20issue=20(count()=20on=20none=20array)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cmdbabstract.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index f5bf8269c..6168093cf 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -2494,7 +2494,7 @@ EOF else { $aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, $aArgs); - if (count($aAllowedValues) == 1) + if (is_array($aAllowedValues) && count($aAllowedValues) == 1) { $aValues = array_keys($aAllowedValues); $this->Set($sAttCode, $aValues[0]);