From 3dd558436caaf5d24b60eaa85115dcb61966d5bd Mon Sep 17 00:00:00 2001 From: Justin Maurer Date: Tue, 2 Jan 2024 09:43:40 -0600 Subject: [PATCH 1/2] made an implicit float to integer conversion explicit --- includes/class-ast-staging.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-ast-staging.php b/includes/class-ast-staging.php index 151176ac..cf8605f6 100644 --- a/includes/class-ast-staging.php +++ b/includes/class-ast-staging.php @@ -175,7 +175,7 @@ public static function get_autoshare_live_url_lock_key() { $scheme = wp_parse_url( $url, PHP_URL_SCHEME ) . '://'; $url = str_replace( $scheme, '', $url ); - return $scheme . substr_replace( $url, '_[autoshare_liveurl]_', strlen( $url ) / 2, 0 ); + return $scheme . substr_replace( $url, '_[autoshare_liveurl]_', intval(strlen( $url ) / 2), 0 ); } /** From 9bc7334e06079489542bcde7d3d3eb4888cfda73 Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Wed, 3 Jan 2024 20:09:09 +0530 Subject: [PATCH 2/2] Fix PHPCS errors. --- includes/class-ast-staging.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-ast-staging.php b/includes/class-ast-staging.php index cf8605f6..4747ea90 100644 --- a/includes/class-ast-staging.php +++ b/includes/class-ast-staging.php @@ -175,7 +175,7 @@ public static function get_autoshare_live_url_lock_key() { $scheme = wp_parse_url( $url, PHP_URL_SCHEME ) . '://'; $url = str_replace( $scheme, '', $url ); - return $scheme . substr_replace( $url, '_[autoshare_liveurl]_', intval(strlen( $url ) / 2), 0 ); + return $scheme . substr_replace( $url, '_[autoshare_liveurl]_', intval( strlen( $url ) / 2 ), 0 ); } /**