From ccb209d29ec1351850e5ede49fdaf3758d26be44 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 28 Jun 2005 22:07:09 +0000 Subject: [PATCH] Ensure that width and height fields are not null when we insert --- includes/Image.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Image.php b/includes/Image.php index 69f24de0f6..37f02d9f02 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -1273,8 +1273,8 @@ class Image array( 'img_name' => $this->name, 'img_size'=> $this->size, - 'img_width' => $this->width, - 'img_height' => $this->height, + 'img_width' => IntVal( $this->width ), + 'img_height' => IntVal( $this->height ), 'img_bits' => $this->bits, 'img_media_type' => $this->type, 'img_major_mime' => $major, @@ -1319,8 +1319,8 @@ class Image $dbw->update( 'image', array( /* SET */ 'img_size' => $this->size, - 'img_width' => $this->width, - 'img_height' => $this->height, + 'img_width' => intval( $this->width ), + 'img_height' => intval( $this->height ), 'img_bits' => $this->bits, 'img_media_type' => $this->type, 'img_major_mime' => $major, -- 2.20.1