Skip to content
Snippets Groups Projects
Commit 2e0ce437 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

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

parent 6201c7a8
No related branches found
No related tags found
No related merge requests found
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment