Index: trunk/phase3/includes/Exif.php |
— | — | @@ -295,9 +295,13 @@ |
296 | 296 | $this->makeFlatExifTags(); |
297 | 297 | |
298 | 298 | $this->debugFile( $this->basename, __FUNCTION__, true ); |
299 | | - wfSuppressWarnings(); |
300 | | - $data = exif_read_data( $this->file ); |
301 | | - wfRestoreWarnings(); |
| 299 | + if( function_exists( 'exif_read_data' ) ) { |
| 300 | + wfSuppressWarnings(); |
| 301 | + $data = exif_read_data( $this->file ); |
| 302 | + wfRestoreWarnings(); |
| 303 | + } else { |
| 304 | + throw new MWException( "Internal error: exif_read_data not present. \$wgShowEXIF may be incorrectly set or not checked by an extension." ); |
| 305 | + } |
302 | 306 | /** |
303 | 307 | * exif_read_data() will return false on invalid input, such as |
304 | 308 | * when somebody uploads a file called something.jpeg |