From 10d4093561d881aa6eeb4d0d1b9a41bb9e73c4f1 Mon Sep 17 00:00:00 2001 From: Marc Alexander <admin@m-a-styles.de> Date: Mon, 14 Mar 2016 13:33:37 +0100 Subject: [PATCH] [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 --- phpBB/phpbb/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index f5ad5096bb..faedd79703 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -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);