Merge pull request #3259 from Frogging101/slika

media: Fix media_resize_image cache check
This commit is contained in:
Andreas Gohr 2020-09-08 08:33:23 +02:00 committed by GitHub
commit 8b68d704fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2061,14 +2061,14 @@ function media_resize_image($file, $ext, $w, $h=0){
//cache
$local = getCacheName($file,'.media.'.$w.'x'.$h.'.'.$ext);
$mtime = @filemtime($local); // 0 if not exists
$mtime = (int) @filemtime($local); // 0 if not exists
$options = [
'quality' => $conf['jpg_quality'],
'imconvert' => $conf['im_convert'],
];
if( $mtime > @filemtime($file) ) {
if( $mtime <= (int) @filemtime($file) ) {
try {
\splitbrain\slika\Slika::run($file, $options)
->autorotate()