dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53b17f7
)
If the file doesn't exist, we get a whole bunch of cascading PHP errors.
author
Chad Horohoe
<demon@users.mediawiki.org>
Mon, 13 Apr 2009 15:05:47 +0000
(15:05 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Mon, 13 Apr 2009 15:05:47 +0000
(15:05 +0000)
includes/media/Bitmap.php
patch
|
blob
|
history
diff --git
a/includes/media/Bitmap.php
b/includes/media/Bitmap.php
index
c2f2458
..
76cc891
100644
(file)
--- a/
includes/media/Bitmap.php
+++ b/
includes/media/Bitmap.php
@@
-191,6
+191,12
@@
class BitmapHandler extends ImageHandler {
return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $err );
}
+ if ( !file_exists( $srcPath ) ) {
+ $err = "File seems to be missing: $srcPath";
+ wfDebug( "$err\n" );
+ return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $err );
+ }
+
$src_image = call_user_func( $loader, $srcPath );
$dst_image = imagecreatetruecolor( $physicalWidth, $physicalHeight );