Skip to content

Commit 4a0cd5d

Browse files
committed
Fix phpstan
1 parent b5bce02 commit 4a0cd5d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/ppcp-local-alternative-payment-methods/src/LocalAlternativePaymentMethodsModule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,9 @@ public function handle_pwc_order_received_redirect(): void {
540540
*/
541541
private function is_rest_request(): bool {
542542
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
543-
$request_uri = wp_unslash( (string) ( $_SERVER['REQUEST_URI'] ?? '' ) );
543+
$request_uri = wp_unslash( $_SERVER['REQUEST_URI'] ?? '' );
544544

545-
return strpos( $request_uri, '/wp-json/wc/' ) !== false;
545+
return is_string( $request_uri ) && strpos( $request_uri, '/wp-json/wc/' ) !== false;
546546
}
547547

548548
/**

0 commit comments

Comments
 (0)