Skip to content

Commit

Permalink
fix(common): getMax fails with PHP 7.4
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jan 29, 2020
1 parent d39aab4 commit 51ebc45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/common.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 51ebc45

Please sign in to comment.