Make WordPress Core

Ticket #66155: patch.diff

File patch.diff, 3.3 KB (added by arshidkv12, 18 hours ago)
  • src/wp-admin/includes/class-wp-links-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-links-list-table.php b/src/wp-admin/includes/class-wp-links-list-table.php
    index ae1f50175c..6da144bf50 100644
    a b class WP_Links_List_Table extends WP_List_Table {  
    6060                        'hide_empty'     => 0,
    6161                );
    6262
    63                 if ( 'all' !== $cat_id ) {
     63                if ( 0 !== $cat_id ) {
    6464                        $args['category'] = $cat_id;
    6565                }
    6666                if ( ! empty( $s ) ) {
  • src/wp-includes/block-supports/layout.php

    diff --git a/src/wp-includes/block-supports/layout.php b/src/wp-includes/block-supports/layout.php
    index b7c0503d3b..dc9dc0768c 100644
    a b function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false  
    780780                        }
    781781                        $gap_value = trim( $combined_gap_value );
    782782
    783                         if ( null !== $gap_value && ! $should_skip_gap_serialization ) {
     783                        if ( '' !== $gap_value && ! $should_skip_gap_serialization ) {
    784784                                $layout_styles[] = array(
    785785                                        'selector'     => $selector,
    786786                                        'declarations' => array( 'gap' => $gap_value ),
  • src/wp-includes/class-wp-rewrite.php

    diff --git a/src/wp-includes/class-wp-rewrite.php b/src/wp-includes/class-wp-rewrite.php
    index 8b75fa5c36..33f45c7c11 100644
    a b class WP_Rewrite {  
    799799         */
    800800        public function add_rewrite_tag( $tag, $regex, $query ) {
    801801                $position = array_search( $tag, $this->rewritecode, true );
    802                 if ( false !== $position && null !== $position ) {
     802                if ( false !== $position ) {
    803803                        $this->rewritereplace[ $position ] = $regex;
    804804                        $this->queryreplace[ $position ]   = $query;
    805805                } else {
    class WP_Rewrite {  
    823823         */
    824824        public function remove_rewrite_tag( $tag ) {
    825825                $position = array_search( $tag, $this->rewritecode, true );
    826                 if ( false !== $position && null !== $position ) {
     826                if ( false !== $position ) {
    827827                        unset( $this->rewritecode[ $position ] );
    828828                        unset( $this->rewritereplace[ $position ] );
    829829                        unset( $this->queryreplace[ $position ] );
  • tests/phpstan/baselines/notIdentical.alwaysTrue.neon

    diff --git a/tests/phpstan/baselines/notIdentical.alwaysTrue.neon b/tests/phpstan/baselines/notIdentical.alwaysTrue.neon
    index 6d144b7468..ed00a5e7f8 100644
    a b  
    1818
    1919parameters:
    2020        ignoreErrors:
    21                 -
    22                         message: '#^Strict comparison using \!\=\= between ''all'' and int will always evaluate to true\.$#'
    23                         identifier: notIdentical.alwaysTrue
    24                         count: 1
    25                         path: ../../../src/wp-admin/includes/class-wp-links-list-table.php
    26                 -
    27                         message: '#^Strict comparison using \!\=\= between null and string will always evaluate to true\.$#'
    28                         identifier: notIdentical.alwaysTrue
    29                         count: 1
    30                         path: ../../../src/wp-includes/block-supports/layout.php
    31                 -
    32                         message: '#^Strict comparison using \!\=\= between null and int\|string will always evaluate to true\.$#'
    33                         identifier: notIdentical.alwaysTrue
    34                         count: 2
    35                         path: ../../../src/wp-includes/class-wp-rewrite.php
    3621                -
    3722                        message: '#^Strict comparison using \!\=\= between ''Etc'' and ''Africa''\|''America''\|''Antarctica''\|''Arctic''\|''Asia''\|''Atlantic''\|''Australia''\|''Europe''\|''Indian''\|''Pacific'' will always evaluate to true\.$#'
    3823                        identifier: notIdentical.alwaysTrue