fix : Undefined array key 4 in C:\wamp64\www\dolibarr-140\htdocs\core\class\extrafields.class.php on line 1721

This commit is contained in:
Philippe GRAND 2021-08-22 12:18:26 +02:00
parent 6619099be9
commit 2e3b9fce49

View File

@ -1718,7 +1718,7 @@ class ExtraFields
$sql = 'SELECT '.$keyList;
$sql .= ' FROM '.MAIN_DB_PREFIX.$InfoFieldList[0];
if (strpos($InfoFieldList[4], 'extra') !== false) {
if (!empty($InfoFieldList[4]) && strpos($InfoFieldList[4], 'extra') !== false) {
$sql .= ' as main';
}
if ($selectkey == 'rowid' && empty($value)) {