Make sure field_mapping is an array before trying to index into it

This commit is contained in:
Nathan Gray 2010-10-13 17:49:48 +00:00
parent f8e69a190a
commit 4e0e0a4050

View File

@ -134,7 +134,7 @@ class importexport_wizard_basic_import_csv
$english = array(); $english = array();
foreach($content['csv_fields'] as $index => $field) { foreach($content['csv_fields'] as $index => $field) {
if($content['field_mapping'][$index]) continue; if($content['field_mapping'][$index]) continue;
if($content['plugin_options']['field_mapping'][$index]) { if(is_array($content['plugin_options']['field_mapping']) && $content['plugin_options']['field_mapping'][$index]) {
# Copy already set, but allow new file to update # Copy already set, but allow new file to update
$content['field_mapping'][$index] = $content['plugin_options']['field_mapping'][$index]; $content['field_mapping'][$index] = $content['plugin_options']['field_mapping'][$index];
} }