From 21c62f083dd02efcdaa46bbafd90fab1a56ea2b0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 16 Nov 2021 08:17:56 +0100 Subject: [PATCH] fix PHP 8.0 ValueError: Path cannot be empty and other IDE errors --- importexport/inc/class.importexport_import_ui.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/importexport/inc/class.importexport_import_ui.inc.php b/importexport/inc/class.importexport_import_ui.inc.php index 1a8822bc6a..9a98f5b693 100644 --- a/importexport/inc/class.importexport_import_ui.inc.php +++ b/importexport/inc/class.importexport_import_ui.inc.php @@ -62,7 +62,7 @@ use EGroupware\Api\Etemplate; { Api\Translation::add_app($appname); } - if($content['import'] && $definition) { + if ($content['import'] && $definition && !empty($content['file']) && file_exists($content['file']['tmp_name'])) { try { if($content['dry-run']) { // Set this so plugin doesn't do any data changes @@ -200,7 +200,7 @@ use EGroupware\Api\Etemplate; } elseif($content['cancel']) { - egw_framework::set_onload('window.close();'); + Api\Framework::window_close(); } elseif ($GLOBALS['egw_info']['user']['apps']['admin']) { @@ -358,7 +358,7 @@ use EGroupware\Api\Etemplate; foreach($plugin->get_errors() as $record => $message) { $this->message .= "
\n$record: $message"; } - if($count != $total_processed) $this->message .= "
\n".lang('Some records may not have been imported'); + $this->message .= "
\n".lang('Some records may not have been imported'); $this->message .= "
\n"; } return '
' . lang('Preview') . ' - ' . $plugin->get_name() . '
' . $preview;