Fix for bug in v5.3 when image caching is enabled
-
There’s a bug in the latest version (5.3) when image caching is enabled, which is due to the preg_match on line 184 not matching the new https links, so PHP can’t write any local thumbnail files to the cache dir as the $flickrSlugMatches variable is empty.
Here’s a short diff with the fix (it’s a single line):
--- flickrrss.php +++ flickrrss.fix.php @@ -181,7 +181,7 @@ strpos( $settings['html'], "%image_" . $size . "%" ) ) { $img_to_cache = $thumbnail; - preg_match( '<https://farm[0-9]{0,3}\.static.?flickr\.com/\d+?\/([^.]*)\.jpg>', $img_to_cache, $flickrSlugMatches ); + preg_match( '<https?://farm[0-9]{0,3}\.static.?flickr\.com/\d+?\/([^.]*)\.jpg>', $img_to_cache, $flickrSlugMatches ); $flickrSlug = $flickrSlugMatches[1]; if ( ! file_exists( "$fullPath$flickrSlug.jpg" ) ) { $localimage = fopen( "$fullPath$flickrSlug.jpg", 'wb' );
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Fix for bug in v5.3 when image caching is enabled’ is closed to new replies.