Skip to content

Commit

Permalink
Update includes/class-simple-local-avatars.php
Browse files Browse the repository at this point in the history
Co-authored-by: Faisal Alvi <[email protected]>
  • Loading branch information
ocean90 and faisal-alvi authored Feb 7, 2025
1 parent 253e9bc commit faba180
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-simple-local-avatars.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public function get_simple_local_avatar_url( $id_or_email, $size ) {
$editor = wp_get_image_editor( $avatar_full_path );
if ( ! is_wp_error( $editor ) ) {
$image_size = $editor->get_size();
if ( ! $image_size || $image_size['width'] !== $size || $image_size['height'] !== $size ) {
if ( ! is_array( $image_size ) || $image_size['width'] !== $size || $image_size['height'] !== $size ) {
$resized = $editor->resize( $size, $size, true );
if ( ! is_wp_error( $resized ) ) {
$dest_file = $editor->generate_filename();
Expand Down

0 comments on commit faba180

Please sign in to comment.