From 874da32f81a896105aebd0e38c06db1266ef4258 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 21 Nov 2022 11:05:01 -0700 Subject: [PATCH] importexport: Avoid error or infinite loop for really badly parsed select values --- importexport/inc/class.importexport_import_csv.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/importexport/inc/class.importexport_import_csv.inc.php b/importexport/inc/class.importexport_import_csv.inc.php index 8febfe05be..a52d6dd31b 100755 --- a/importexport/inc/class.importexport_import_csv.inc.php +++ b/importexport/inc/class.importexport_import_csv.inc.php @@ -538,7 +538,7 @@ class importexport_import_csv implements importexport_iface_import_record { //, for($sub_index = 0; $sub_index < count($subs); $sub_index++) { $sub_key = static::find_select_key(trim($subs[$sub_index]), $selects); - if(!$sub_key) + if(!$sub_key && array_key_exists($sub_index+1,$subs)) { $sub_key = static::find_select_key(trim($subs[$sub_index]).','.trim($subs[$sub_index+1]), $selects); if($sub_key) $sub_index++;