diff --git a/projects/packages/status/changelog/update-status-package-add-is-string-checkt-to-compat-check b/projects/packages/status/changelog/update-status-package-add-is-string-checkt-to-compat-check new file mode 100644 index 0000000000000..41313599c8251 --- /dev/null +++ b/projects/packages/status/changelog/update-status-package-add-is-string-checkt-to-compat-check @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Status: Added check for compatibility reasons diff --git a/projects/packages/status/src/class-modules.php b/projects/packages/status/src/class-modules.php index 0755e0251bb5c..f886ca165c4c6 100644 --- a/projects/packages/status/src/class-modules.php +++ b/projects/packages/status/src/class-modules.php @@ -166,7 +166,7 @@ public function get_file_data( $file, $headers ) { } $key = md5( $file_name . maybe_serialize( $headers ) ); - $refresh_cache = is_admin() && isset( $_GET['page'] ) && str_starts_with( $_GET['page'], 'jetpack' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput + $refresh_cache = is_admin() && isset( $_GET['page'] ) && is_string( $_GET['page'] ) && str_starts_with( $_GET['page'], 'jetpack' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput // If we don't need to refresh the cache, and already have the value, short-circuit! if ( ! $refresh_cache && isset( $file_data_option[ $key ] ) ) {