Ensure we are always saving the image height and width as ints

This commit is contained in:
Mark Nelson 2016-06-16 13:33:26 +08:00
parent ed93542c0c
commit e480f5c98f

View file

@ -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);