From 51ebc4592a85545ce2dd5f545374e91d83e1a7b8 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Wed, 29 Jan 2020 09:04:10 +0100 Subject: [PATCH] fix(common): getMax fails with PHP 7.4 Signed-off-by: Thierry Bugier --- inc/common.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/common.class.php b/inc/common.class.php index 499d15423..66347d37e 100644 --- a/inc/common.class.php +++ b/inc/common.class.php @@ -148,7 +148,7 @@ public static function getMax(CommonDBTM $item, array $condition, $fieldName) { 'LIMIT' => 1 ])->next(); - if ($line === null) { + if (!isset($line[$fieldName])) { return null; } return (int) $line[$fieldName];