mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 10:53:39 +01:00
fix diverse PHP 8.0 TypeErrors and ArgumentCountError in import/export
This commit is contained in:
parent
379eb053a3
commit
eca5200268
@ -103,7 +103,7 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
|
|||||||
if(!in_array($contact_owner, array_keys($this->bocontacts->get_addressbooks(Api\Acl::ADD))))
|
if(!in_array($contact_owner, array_keys($this->bocontacts->get_addressbooks(Api\Acl::ADD))))
|
||||||
{
|
{
|
||||||
$this->warnings[0] = lang("Unable to import into %1, using %2",
|
$this->warnings[0] = lang("Unable to import into %1, using %2",
|
||||||
$contact_owner . ' ('.Api\Accounts::username($contact_owner) . ')',
|
$contact_owner . ' (' . (is_numeric($contact_owner) ? Api\Accounts::username($contact_owner) : $contact_owner) . ')',
|
||||||
Api\Accounts::username($this->user)
|
Api\Accounts::username($this->user)
|
||||||
);
|
);
|
||||||
$contact_owner = 'personal';
|
$contact_owner = 'personal';
|
||||||
|
@ -108,13 +108,13 @@ class addressbook_wizard_import_contacts_csv extends importexport_wizard_basic_i
|
|||||||
{
|
{
|
||||||
$content['msg'] = $this->steps['wizard_step60'];
|
$content['msg'] = $this->steps['wizard_step60'];
|
||||||
$content['step'] = 'wizard_step60';
|
$content['step'] = 'wizard_step60';
|
||||||
if(!array_key_exists($content['contact_owner']) && $content['plugin_options']) {
|
if(!array_key_exists('contact_owner', $content) && $content['plugin_options']) {
|
||||||
$content['contact_owner'] = $content['plugin_options']['contact_owner'];
|
$content['contact_owner'] = $content['plugin_options']['contact_owner'];
|
||||||
}
|
}
|
||||||
if(!array_key_exists($content['owner_from_csv']) && $content['plugin_options']) {
|
if(!array_key_exists('owner_from_csv', $content) && $content['plugin_options']) {
|
||||||
$content['owner_from_csv'] = $content['plugin_options']['owner_from_csv'];
|
$content['owner_from_csv'] = $content['plugin_options']['owner_from_csv'];
|
||||||
}
|
}
|
||||||
if(!array_key_exists($content['change_owner']) && $content['plugin_options']) {
|
if(!array_key_exists('change_owner', $content) && $content['plugin_options']) {
|
||||||
$content['change_owner'] = $content['plugin_options']['change_owner'];
|
$content['change_owner'] = $content['plugin_options']['change_owner'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,7 +426,7 @@ class importexport_wizard_basic_import_csv
|
|||||||
$sel_options['action'] = $this->actions;
|
$sel_options['action'] = $this->actions;
|
||||||
|
|
||||||
// Make at least 1 (empty) conditions
|
// Make at least 1 (empty) conditions
|
||||||
$j = count($content['conditions']);
|
$j = count($content['conditions'] ?? []);
|
||||||
while ($j < 1)
|
while ($j < 1)
|
||||||
{
|
{
|
||||||
$content['conditions'][] = array(
|
$content['conditions'][] = array(
|
||||||
|
Loading…
Reference in New Issue
Block a user