Skip to content

Commit bfad6f1

Browse files
authored
[5.3] php 8.4 compatibility (joomla#45169)
PHP Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated Signed-off-by: BrianTeeman <[email protected]>
1 parent be4da74 commit bfad6f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

administrator/components/com_users/src/Model/CaptiveModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public function checkTryLimit(MfaTable $method)
426426
$maxTries = (int) $params->get('mfatrycount', 10);
427427
$blockHours = (int) $params->get('mfatrytime', 1);
428428

429-
$lastTryTime = strtotime($method->last_try) ?: 0;
429+
$lastTryTime = $method->last_try !== null ? strtotime($method->last_try) : 0;
430430
$hoursSinceLastTry = (strtotime(Factory::getDate()->toSql()) - $lastTryTime) / 3600;
431431

432432
if ($method->last_try !== null && $hoursSinceLastTry > $blockHours) {

0 commit comments

Comments
 (0)