Avoid some more PHP8 errors

An error happened! (TypeError): Cannot access offset of type string on string
This commit is contained in:
nathan 2021-10-13 15:34:32 -06:00
parent f8fd87cd1d
commit 7502749ef1

View File

@ -285,10 +285,17 @@ class importexport_wizard_basic_export_csv
$content['application'], $content['plugin'], $this $content['application'], $content['plugin'], $this
); );
// Load existing filter from either content or definition // Load existing filter from either content or definition
if(!array_key_exists('filter', $content) || !is_array($content['filter']))
{
$content['filter'] = [];
}
foreach($content['set_filter']['fields'] as $field => $settings) foreach($content['set_filter']['fields'] as $field => $settings)
{
if(array_key_exists($field, $content['filter']))
{ {
$content['set_filter'][$field] = $content['filter'][$field]; $content['set_filter'][$field] = $content['filter'][$field];
} }
}
if(!$content['set_filter']['fields']) if(!$content['set_filter']['fields'])
{ {