Skip to content

Commit

Permalink
Merge pull request #695 from humanmade/fix-typeerror-simple-local-ava…
Browse files Browse the repository at this point in the history
…tars

Fix a PHP8 TypeError in 10up/simple-local-avatars
  • Loading branch information
kovshenin authored Jan 23, 2023
2 parents 2dc33f9 + 4864da0 commit c79d481
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ public function assign_new_user_avatar( $url_or_media_id, $user_id ) {
$meta_value = array();

// set the new avatar
if ( is_int( $url_or_media_id + 0 ) ) {
if ( is_numeric( $url_or_media_id ) ) {
$meta_value['media_id'] = $url_or_media_id;
$url_or_media_id = wp_get_attachment_url( $url_or_media_id );
}
Expand Down

0 comments on commit c79d481

Please sign in to comment.