Skip to content

Commit

Permalink
fix empty ->getCacheFilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
lphoumpakka committed May 17, 2023
1 parent e450d2a commit e33e6c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wpthumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://github.com/humanmade/WPThumb
Description: An on-demand image generation replacement for WordPress' image resizing.
Author: Human Made Limited
Version: 0.10
Version: 0.11
Author URI: http://www.hmn.md/
*/

Expand Down Expand Up @@ -668,7 +668,7 @@ function wpthumb_post_image( $null, $id, $args ) {

$crop = (bool) ( empty( $crop ) ) ? false : $crop;

if ( ! $image->errored() && $image_meta = @getimagesize( $image->getCacheFilePath() ) ) :
if ( ! $image->errored() && ! empty( $image->getCacheFilePath() ) && $image_meta = @getimagesize( $image->getCacheFilePath() ) ) :

$html_width = $image_meta[0];
$html_height = $image_meta[1];
Expand Down

0 comments on commit e33e6c8

Please sign in to comment.