Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in `wp-includes/widgets/class…
Browse files Browse the repository at this point in the history
…-wp-widget-rss.php`.

Props mukesh27.
Fixes #50125.

git-svn-id: https://develop.svn.wordpress.org/trunk@47774 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed May 8, 2020
1 parent 09bcb48 commit 0d72442
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wp-includes/widgets/class-wp-widget-rss.php
Expand Up @@ -48,7 +48,7 @@ public function widget( $args, $instance ) {
}

$url = ! empty( $instance['url'] ) ? $instance['url'] : '';
while ( stristr( $url, 'http' ) != $url ) {
while ( stristr( $url, 'http' ) !== $url ) {
$url = substr( $url, 1 );
}

Expand All @@ -72,7 +72,7 @@ public function widget( $args, $instance ) {
$title = strip_tags( $rss->get_title() );
}
$link = strip_tags( $rss->get_permalink() );
while ( stristr( $link, 'http' ) != $link ) {
while ( stristr( $link, 'http' ) !== $link ) {
$link = substr( $link, 1 );
}
}
Expand Down Expand Up @@ -114,7 +114,7 @@ public function widget( $args, $instance ) {
* @return array Updated settings to save.
*/
public function update( $new_instance, $old_instance ) {
$testurl = ( isset( $new_instance['url'] ) && ( ! isset( $old_instance['url'] ) || ( $new_instance['url'] != $old_instance['url'] ) ) );
$testurl = ( isset( $new_instance['url'] ) && ( ! isset( $old_instance['url'] ) || ( $new_instance['url'] !== $old_instance['url'] ) ) );
return wp_widget_rss_process( $new_instance, $testurl );
}

Expand Down

0 comments on commit 0d72442

Please sign in to comment.