Fix: strpos($InfoFieldList[4], 'extra') generates a warning if $InfoFieldList[4] does not exist (#30483)

This commit is contained in:
Bahfir Abbes 2024-07-28 17:42:19 +02:00 committed by GitHub
parent 2c0e7fb4ad
commit 6b80e2000b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8263,7 +8263,7 @@ abstract class CommonObject
$sql = "SELECT ".$keyList;
$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
if (strpos($InfoFieldList[4], 'extra') !== false) {
if (isset($InfoFieldList[4]) && strpos($InfoFieldList[4], 'extra') !== false) {
$sql .= ' as main';
}
if ($selectkey == 'rowid' && empty($value)) {