mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
fix mail account creation under PHP 8.0
PHP 8.0: "new" > 0 === true PHP<8.0: "new" > 0 === false
This commit is contained in:
parent
ed86f5bfae
commit
9a15aad67d
@ -1031,7 +1031,7 @@ class admin_mail
|
||||
unset($content['smimeKeyUpload']);
|
||||
}
|
||||
self::fix_account_id_0($content['account_id'], true);
|
||||
$content = Mail\Account::write($content, $content['called_for'] || !$this->is_admin ?
|
||||
$content = Mail\Account::write($content, !empty($content['called_for']) && $this->is_admin ?
|
||||
$content['called_for'] : $GLOBALS['egw_info']['user']['account_id']);
|
||||
self::fix_account_id_0($content['account_id']);
|
||||
$msg = lang('Account saved.');
|
||||
|
@ -781,7 +781,7 @@ class Account implements \ArrayAccess
|
||||
'account_id' => self::is_multiple($identity) ? 0 :
|
||||
(is_array($identity['account_id']) ? $identity['account_id'][0] : $identity['account_id']),
|
||||
);
|
||||
if ($identity['ident_id'] > 0)
|
||||
if ($identity['ident_id'] !== 'new' && (int)$identity['ident_id'] > 0)
|
||||
{
|
||||
self::$db->update(self::IDENTITIES_TABLE, $data, array(
|
||||
'ident_id' => $identity['ident_id'],
|
||||
@ -1196,7 +1196,7 @@ class Account implements \ArrayAccess
|
||||
|
||||
// store identity
|
||||
$new_ident_id = self::save_identity($data);
|
||||
if (!($data['ident_id'] > 0))
|
||||
if ($data['ident_id'] === 'new' || empty($data['ident_id']))
|
||||
{
|
||||
$data['ident_id'] = $new_ident_id;
|
||||
self::$db->update(self::TABLE, array(
|
||||
|
Loading…
Reference in New Issue
Block a user