Skip to content

Commit b14d625

Browse files
committed
Use strpos instead of str_contains
str_contains is PHP 8 only while strpos works on older versions of PHP Fixes #431
1 parent 189e264 commit b14d625

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Plugin_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ protected function get_wporg_data( $plugin_name ) {
863863

864864
// Check the last update date.
865865
$r_body = wp_remote_retrieve_body( $request );
866-
if ( str_contains( $r_body, 'pubDate' ) ) {
866+
if ( strpos( $r_body, 'pubDate' ) !== false ) {
867867
// Very raw check, not validating the format or anything else.
868868
$xml = simplexml_load_string( $r_body );
869869
$xml_pub_date = $xml->xpath( '//pubDate' );

0 commit comments

Comments
 (0)