Permalink
Browse files

Avoid a warning when a media cachefile doesn't exist yet

  • Loading branch information...
1 parent 6201c7a commit 2e0ce43774bc165c88e07cd1eab502a22ebfa2ae @splitbrain splitbrain committed Dec 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 inc/media.php
View
@@ -1778,7 +1778,7 @@ function media_crop_image($file, $ext, $w, $h=0){
$local = getCacheName($file,'.media.'.$cw.'x'.$ch.'.crop.'.$ext);
$mtime = @filemtime($local); // 0 if not exists
- if( $mtime > filemtime($file) ||
+ if( $mtime > @filemtime($file) ||
media_crop_imageIM($ext,$file,$info[0],$info[1],$local,$cw,$ch,$cx,$cy) ||
media_resize_imageGD($ext,$file,$cw,$ch,$local,$cw,$ch,$cx,$cy) ){
if($conf['fperm']) chmod($local, $conf['fperm']);

0 comments on commit 2e0ce43

Please sign in to comment.