From 2e0ce43774bc165c88e07cd1eab502a22ebfa2ae Mon Sep 17 00:00:00 2001
From: Andreas Gohr <gohr@cosmocode.de>
Date: Tue, 13 Dec 2011 15:18:29 +0100
Subject: [PATCH] Avoid a warning when a media cachefile doesn't exist yet

---
 inc/media.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/media.php b/inc/media.php
index e71bfd236..93692a7c6 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -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']);
-- 
GitLab