Skip to content

Commit

Permalink
[3.10] [PHP 8.1] Fixes Table User for Date/Date.php warning on login (j…
Browse files Browse the repository at this point in the history
…oomla#36799)

Fixes `Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home/beat/www/j/libraries/src/Date/Date.php on line 112` error on login
  • Loading branch information
beat authored Jan 23, 2022
1 parent df0a012 commit d19bbe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/src/Table/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public function setLastVisit($timeStamp = null, $userId = null)
}

// If no timestamp value is passed to function, than current time is used.
$date = \JFactory::getDate($timeStamp);
$date = \JFactory::getDate($timeStamp === null ? 'now' : $timeStamp);

// Update the database row for the user.
$db = $this->_db;
Expand Down

0 comments on commit d19bbe0

Please sign in to comment.