fix PHP 8.0 Error: Illegal string offset 'string'

This commit is contained in:
Ralf Becker 2021-11-23 17:17:48 +01:00
parent e2f06d0b94
commit dd73884534

View File

@ -193,10 +193,12 @@ class importexport_definition implements importexport_iface_egw_record {
* *
* @param array $options * @param array $options
*/ */
private function set_options(array $_plugin_options) { private function set_options(array $_plugin_options)
{
// Check conditions // Check conditions
foreach ( (Array)$_plugin_options['conditions'] as $key => $condition ) { foreach ((array)$_plugin_options['conditions'] as $key => $condition)
if(!$condition['string'] && array_key_exists($key, $_plugin_options['conditions'])) {
if (is_array($condition) && empty($condition['string']) && array_key_exists($key, $_plugin_options['conditions']))
{ {
unset($_plugin_options['conditions'][$key]); unset($_plugin_options['conditions'][$key]);
} }