Make WordPress Core

Changeset 47220


Ignore:
Timestamp:
02/09/2020 05:06:55 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Correct the get_plugin_page_hook() check in wp-admin/admin.php.

The condition is meant to check for a non-empty string, however get_plugin_page_hook() can return null, in which case the strict check doesn't work as expected.

Follow-up to [47218].

See #48455, #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin.php

    r47218 r47220  
    182182
    183183        // Back-compat for plugins using add_management_page().
    184         if ( empty( $page_hook ) && 'edit.php' === $pagenow && '' !== get_plugin_page_hook( $plugin_page, 'tools.php' ) ) {
     184        if ( empty( $page_hook ) && 'edit.php' === $pagenow && get_plugin_page_hook( $plugin_page, 'tools.php' ) ) {
    185185            // There could be plugin specific params on the URL, so we need the whole query string.
    186186            if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.