From 213faca8ed4a51a49ca280475a884f67104b7ca5 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 6 Jun 2004 05:36:39 +0000 Subject: Merge to HEAD; 1.3.0beta2 --- includes/Image.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'includes/Image.php') diff --git a/includes/Image.php b/includes/Image.php index d0293a5443c7..27eeb9d72e3f 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -35,16 +35,17 @@ class Image if ( $this->fileExists = file_exists( $this->imagePath ) ) // Sic!, "=" is intended { - $gis = getimagesize( $this->imagePath ); - $this->width = $gis[0]; - $this->height = $gis[1]; - $this->type = $gis[2]; - $this->attr = $gis[3]; - if ( isset( $gis["bits"] ) ) - { - $this->bits = $gis["bits"]; - } else { - $this->bits = 0; + @$gis = getimagesize( $this->imagePath ); + if( $gis !== false ) { + $this->width = $gis[0]; + $this->height = $gis[1]; + $this->type = $gis[2]; + $this->attr = $gis[3]; + if ( isset( $gis["bits"] ) ) { + $this->bits = $gis["bits"]; + } else { + $this->bits = 0; + } } } $this->historyLine = 0; -- cgit v1.2.3