From b14d62503ca654920e692059f1c058aa4198ef33 Mon Sep 17 00:00:00 2001 From: Isla Waters Date: Wed, 14 Aug 2024 15:26:07 -0400 Subject: [PATCH] Use strpos instead of str_contains str_contains is PHP 8 only while strpos works on older versions of PHP Fixes #431 --- src/Plugin_Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plugin_Command.php b/src/Plugin_Command.php index 935d4b44..ca8c346a 100644 --- a/src/Plugin_Command.php +++ b/src/Plugin_Command.php @@ -863,7 +863,7 @@ protected function get_wporg_data( $plugin_name ) { // Check the last update date. $r_body = wp_remote_retrieve_body( $request ); - if ( str_contains( $r_body, 'pubDate' ) ) { + if ( strpos( $r_body, 'pubDate' ) !== false ) { // Very raw check, not validating the format or anything else. $xml = simplexml_load_string( $r_body ); $xml_pub_date = $xml->xpath( '//pubDate' );