fix some warnings (in Travis and otherwise)

This commit is contained in:
Ralf Becker 2020-03-05 13:39:57 +01:00
parent 7283d33a93
commit 8699957179

View File

@ -35,6 +35,10 @@ class admin_cmd_delete_account extends admin_cmd
'is_user' => $is_user, 'is_user' => $is_user,
)+$extra; )+$extra;
} }
if (empty($account['change_apps']))
{
$account['change_apps'] = [];
}
admin_cmd::__construct($account); admin_cmd::__construct($account);
} }
@ -201,7 +205,7 @@ class admin_cmd_delete_account extends admin_cmd
// First do apps that were not selected // First do apps that were not selected
$skip_apps = array(); $skip_apps = array();
$do_last = array('preferences','admin','api'); $do_last = array('preferences','admin','api');
foreach(array_diff(array_keys($GLOBALS['egw_info']['apps']), array_merge($this->change_apps,$do_last)) as $app) foreach(array_diff(array_keys($GLOBALS['egw_info']['apps'] ?? []), array_merge($this->change_apps,$do_last)) as $app)
{ {
$skip_apps[] = $app; $skip_apps[] = $app;
Api\Hooks::single(array_merge($GLOBALS['hook_values'], array('new_owner' => 0)), $app, true); Api\Hooks::single(array_merge($GLOBALS['hook_values'], array('new_owner' => 0)), $app, true);
@ -295,7 +299,7 @@ class admin_cmd_delete_account extends admin_cmd
* *
* @return string * @return string
*/ */
function __tostring() function __toString()
{ {
return lang('Delete account %1', return lang('Delete account %1',
// use own data to display deleted name of user/group // use own data to display deleted name of user/group