From 4864da0834e4ef57abc18d2c98c07785d943bc98 Mon Sep 17 00:00:00 2001 From: Konstantin Kovshenin Date: Thu, 19 Jan 2023 12:14:35 +0000 Subject: [PATCH] Fix a PHP8 TypeError in 10up/simple-local-avatars Backports: https://github.com/10up/simple-local-avatars/commit/9f28dc352fae18a6fb9388c478bf7815c920b915 --- .../includes/class-simple-local-avatars.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/simple-local-avatars/includes/class-simple-local-avatars.php b/lib/simple-local-avatars/includes/class-simple-local-avatars.php index 0a2cdb1c..98c02522 100644 --- a/lib/simple-local-avatars/includes/class-simple-local-avatars.php +++ b/lib/simple-local-avatars/includes/class-simple-local-avatars.php @@ -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 ); }