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
*/
private function set_options(array $_plugin_options) {
private function set_options(array $_plugin_options)
{
// Check conditions
foreach ( (Array)$_plugin_options['conditions'] as $key => $condition ) {
if(!$condition['string'] && array_key_exists($key, $_plugin_options['conditions']))
foreach ((array)$_plugin_options['conditions'] as $key => $condition)
{
if (is_array($condition) && empty($condition['string']) && array_key_exists($key, $_plugin_options['conditions']))
{
unset($_plugin_options['conditions'][$key]);
}