Merge pull request #18911 from ksar-ksar/patch-10

FIX #18910 : MRP List SQL query syntax error with more than one extrafileds.
This commit is contained in:
Laurent Destailleur 2021-10-06 14:10:37 +02:00 committed by GitHub
commit 7a9eb0baa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,7 +207,7 @@ $sql .= $object->getFieldList('t');
// Add fields from extrafields
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key.', ' : '');
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key.' ' : '');
}
}
// Add fields from hooks