mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -725,7 +725,7 @@ class user extends \phpbb\session
|
||||||
$utc = new \DateTimeZone('UTC');
|
$utc = new \DateTimeZone('UTC');
|
||||||
}
|
}
|
||||||
|
|
||||||
$time = new $this->datetime($this, "@$gmepoch", $utc);
|
$time = new $this->datetime($this, '@' . (int) $gmepoch, $utc);
|
||||||
$time->setTimezone($this->timezone);
|
$time->setTimezone($this->timezone);
|
||||||
|
|
||||||
return $time->format($format, $forcedate);
|
return $time->format($format, $forcedate);
|
||||||
|
|
Loading…
Add table
Reference in a new issue