Make WordPress Core


Ignore:
Timestamp:
05/08/2020 08:34:21 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-includes/widgets/class-wp-widget-rss.php.

Props mukesh27.
Fixes #50125.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-rss.php

    r47550 r47774  
    4949
    5050        $url = ! empty( $instance['url'] ) ? $instance['url'] : '';
    51         while ( stristr( $url, 'http' ) != $url ) {
     51        while ( stristr( $url, 'http' ) !== $url ) {
    5252            $url = substr( $url, 1 );
    5353        }
     
    7373            }
    7474            $link = strip_tags( $rss->get_permalink() );
    75             while ( stristr( $link, 'http' ) != $link ) {
     75            while ( stristr( $link, 'http' ) !== $link ) {
    7676                $link = substr( $link, 1 );
    7777            }
     
    115115     */
    116116    public function update( $new_instance, $old_instance ) {
    117         $testurl = ( isset( $new_instance['url'] ) && ( ! isset( $old_instance['url'] ) || ( $new_instance['url'] != $old_instance['url'] ) ) );
     117        $testurl = ( isset( $new_instance['url'] ) && ( ! isset( $old_instance['url'] ) || ( $new_instance['url'] !== $old_instance['url'] ) ) );
    118118        return wp_widget_rss_process( $new_instance, $testurl );
    119119    }
Note: See TracChangeset for help on using the changeset viewer.