From 0ce7d66c3a053706842668745bb1205b8cab847f Mon Sep 17 00:00:00 2001 From: thomasmars Date: Thu, 25 May 2017 13:52:50 +0200 Subject: [PATCH] Cast bytes to int before multiplying it. Removes warning in PHP 7.0+ --- h5p.classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 95f1778..6a0799c 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2969,7 +2969,7 @@ class H5PCore { * @return int|string */ public static function returnBytes($val) { - $val = trim($val); + $val = (int) trim($val); $last = strtolower($val[strlen($val) - 1]); switch ($last) { case 'g':