Make WordPress Core

Changeset 59663


Ignore:
Timestamp:
01/18/2025 11:41:46 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp_xmlrpc_server::pingback_ping().

Follow-up to [2983], [55365].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r59660 r59663  
    68866886        $urltest = parse_url( $pagelinkedto );
    68876887        $post_id = url_to_postid( $pagelinkedto );
     6888
    68886889        if ( $post_id ) {
    68896890            // $way
     
    69186919            return $this->pingback_error( 33, __( 'The specified target URL cannot be used as a target. It either does not exist, or it is not a pingback-enabled resource.' ) );
    69196920        }
     6921
    69206922        $post_id = (int) $post_id;
    6921 
    6922         $post = get_post( $post_id );
     6923        $post    = get_post( $post_id );
    69236924
    69246925        if ( ! $post ) { // Post not found.
     
    69266927        }
    69276928
    6928         if ( url_to_postid( $pagelinkedfrom ) == $post_id ) {
     6929        if ( url_to_postid( $pagelinkedfrom ) === $post_id ) {
    69296930            return $this->pingback_error( 0, __( 'The source URL and the target URL cannot both point to the same resource.' ) );
    69306931        }
Note: See TracChangeset for help on using the changeset viewer.