From e480f5c98f62138aab7cf4f2fd3687c256b4d49a Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Thu, 16 Jun 2016 13:33:26 +0800 Subject: [PATCH] Ensure we are always saving the image height and width as ints --- element/image/classes/element.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/element/image/classes/element.php b/element/image/classes/element.php index a4c25c2..39b817a 100644 --- a/element/image/classes/element.php +++ b/element/image/classes/element.php @@ -120,8 +120,8 @@ class element extends \mod_customcert\element { // Array of data we will be storing in the database. $arrtostore = array( 'pathnamehash' => $data->image, - 'width' => $data->width, - 'height' => $data->height + 'width' => (int) $data->width, + 'height' => (int) $data->height ); return json_encode($arrtostore);