From: Brion Vibber Date: Tue, 28 Jun 2005 22:07:09 +0000 (+0000) Subject: Ensure that width and height fields are not null when we insert X-Git-Tag: 1.5.0beta2~145 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=ccb209d29ec1351850e5ede49fdaf3758d26be44;p=lhc%2Fweb%2Fwiklou.git Ensure that width and height fields are not null when we insert --- 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,