mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-30 04:58:37 +01:00
[ticket/14536] Force unix time stamps to be integer
This will ensure to prevent PHP fatal errors in case the passed timestamp is an empty string or does not evaluate to an integer (i.e. strings like foobar). PHPBB3-14536
This commit is contained in:
parent
48bdab88de
commit
10d4093561
@ -725,7 +725,7 @@ class user extends \phpbb\session
|
||||
$utc = new \DateTimeZone('UTC');
|
||||
}
|
||||
|
||||
$time = new $this->datetime($this, "@$gmepoch", $utc);
|
||||
$time = new $this->datetime($this, '@' . (int) $gmepoch, $utc);
|
||||
$time->setTimezone($this->timezone);
|
||||
|
||||
return $time->format($format, $forcedate);
|
||||
|
Loading…
x
Reference in New Issue
Block a user