fix PHP 8.x about math between float and string

This commit is contained in:
ralf 2022-12-09 08:32:52 +01:00
parent 8efd2e45f2
commit 709b825096

View File

@ -229,7 +229,8 @@ class Auth
if (is_null($daysLeftUntilChangeReq) && !empty($GLOBALS['egw_info']['server']['warn_about_upcoming_pwd_change'])) if (is_null($daysLeftUntilChangeReq) && !empty($GLOBALS['egw_info']['server']['warn_about_upcoming_pwd_change']))
{ {
// maxage - passwordage = days left until change is required // maxage - passwordage = days left until change is required
$daysLeftUntilChangeReq = ((float)$GLOBALS['egw_info']['server']['change_pwd_every_x_days'] - ((DateTime::to('now','ts')-($alpwchange_val?$alpwchange_val:0))/86400)); $daysLeftUntilChangeReq = ((float)$GLOBALS['egw_info']['server']['change_pwd_every_x_days'] - ((DateTime::to('now','ts')-
(float)($alpwchange_val?:0))/86400));
} }
if ($alpwchange_val == 0 || // admin requested password change if ($alpwchange_val == 0 || // admin requested password change
$passwordAgeBorder > $alpwchange_val || // change password every N days policy requests change $passwordAgeBorder > $alpwchange_val || // change password every N days policy requests change