aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-03-14 13:33:37 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-03-23 14:44:31 +0100
commit10d4093561d881aa6eeb4d0d1b9a41bb9e73c4f1 (patch)
treee8d8d4bb6512f6bf01f1634f6915c240ad6ff5f8
parent48bdab88deadff137dc31c19e7bb6b62aa240935 (diff)
downloadforums-10d4093561d881aa6eeb4d0d1b9a41bb9e73c4f1.tar
forums-10d4093561d881aa6eeb4d0d1b9a41bb9e73c4f1.tar.gz
forums-10d4093561d881aa6eeb4d0d1b9a41bb9e73c4f1.tar.bz2
forums-10d4093561d881aa6eeb4d0d1b9a41bb9e73c4f1.tar.xz
forums-10d4093561d881aa6eeb4d0d1b9a41bb9e73c4f1.zip
[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
-rw-r--r--phpBB/phpbb/user.php2
1 files changed, 1 insertions, 1 deletions
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);