Fix issue with notices about non well formed numeric values

This commit is contained in:
Fedor A. Fetisov 2021-04-09 16:45:46 +03:00
parent 20da5d2f36
commit 74e69aa520
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ class PasswordRecoveryController extends AbstractController
if (count($page['errors']) == 0) { if (count($page['errors']) == 0) {
$token = sha1($to_restore['vclogin'] . (function_exists('openssl_random_pseudo_bytes') $token = sha1($to_restore['vclogin'] . (function_exists('openssl_random_pseudo_bytes')
? openssl_random_pseudo_bytes(32) ? openssl_random_pseudo_bytes(32)
: (time() + microtime()) . mt_rand(0, 99999999))); : (time() + microtime(true)) . mt_rand(0, 99999999)));
// Update the operator // Update the operator
$to_restore['dtmrestore'] = time(); $to_restore['dtmrestore'] = time();

View File

@ -67,6 +67,6 @@ function set_csrf_token()
if (!isset($_SESSION[SESSION_PREFIX . 'csrf_token'])) { if (!isset($_SESSION[SESSION_PREFIX . 'csrf_token'])) {
$_SESSION[SESSION_PREFIX . 'csrf_token'] = sha1(session_id() . (function_exists('openssl_random_pseudo_bytes') $_SESSION[SESSION_PREFIX . 'csrf_token'] = sha1(session_id() . (function_exists('openssl_random_pseudo_bytes')
? openssl_random_pseudo_bytes(32) ? openssl_random_pseudo_bytes(32)
: (time() + microtime()) . mt_rand(0, 99999999))); : (time() + microtime(true)) . mt_rand(0, 99999999)));
} }
} }