diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 578799b7ee7..0c78d757ea4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2012-2015 Raphaƫl Doursenaud * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2015-2022 Alexandre Spangaro - * Copyright (C) 2016 Bahfir abbes + * Copyright (C) 2016 Bahfir abbes * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017-2019 Nicolas ZABOURI * Copyright (C) 2017 Rui Strecht @@ -8242,7 +8242,7 @@ abstract class CommonObject $selectkey = "rowid"; $keyList = 'rowid'; - if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) { + if (count($InfoFieldList) > 2 && !empty($InfoFieldList[2])) { $selectkey = $InfoFieldList[2]; $keyList = $InfoFieldList[2].' as rowid'; }