Index: trunk/extensions/VipsScaler/SpecialVipsTest.php |
— | — | @@ -242,23 +242,23 @@ |
243 | 243 | # Validate title and file existance |
244 | 244 | $title = Title::makeTitleSafe( NS_FILE, $request->getText( 'thumb' ) ); |
245 | 245 | if ( is_null( $title ) ) { |
246 | | - return $this->streamError( 404 ); |
| 246 | + return $this->streamError( 404, "VipsScaler: invalid title\n" ); |
247 | 247 | } |
248 | 248 | $file = wfFindFile( $title ); |
249 | 249 | if ( !$file || !$file->exists() ) { |
250 | | - return $this->streamError( 404 ); |
| 250 | + return $this->streamError( 404, "VipsScaler: file not found\n" ); |
251 | 251 | } |
252 | 252 | |
253 | 253 | # Check if vips can handle this file |
254 | 254 | if ( VipsScaler::getVipsHandler( $file ) === false ) { |
255 | | - return $this->streamError( 500 ); |
| 255 | + return $this->streamError( 500, "VipsScaler: VIPS cannot handle this file type\n" ); |
256 | 256 | } |
257 | 257 | |
258 | 258 | # Validate param string |
259 | 259 | $handler = $file->getHandler(); |
260 | 260 | $params = array( 'width' => $request->getInt( 'width' ) ); |
261 | 261 | if ( !$handler->normaliseParams( $file, $params ) ) { |
262 | | - return $this->streamError( 500 ); |
| 262 | + return $this->streamError( 500, "VipsScaler: invalid parameters\n" ); |
263 | 263 | } |
264 | 264 | |
265 | 265 | |