Make WordPress Core


Ignore:
Timestamp:
11/23/2020 01:34:21 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Plugins: Check if _error_nonce is set before attempting to verify it.

This avoids a PHP notice on the Plugins screen when error query string is added to the URL.

Props wponlinesupport.
Fixes #43876.

File:
1 edited

Legend:

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

    r49286 r49683  
    642642    <?php
    643643
    644     if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin ) ) {
     644    if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] )
     645        && isset( $_GET['_error_nonce'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin )
     646    ) {
    645647        $iframe_url = add_query_arg(
    646648            array(
Note: See TracChangeset for help on using the changeset viewer.