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. Built from https://develop.svn.wordpress.org/trunk@49683 git-svn-id: http://core.svn.wordpress.org/trunk@49406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8312762816
commit
5f9cf0141e
|
@ -641,7 +641,9 @@ if ( isset( $_GET['error'] ) ) :
|
||||||
<div id="message" class="error"><p><?php echo $errmsg; ?></p>
|
<div id="message" class="error"><p><?php echo $errmsg; ?></p>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin ) ) {
|
if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] )
|
||||||
|
&& isset( $_GET['_error_nonce'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin )
|
||||||
|
) {
|
||||||
$iframe_url = add_query_arg(
|
$iframe_url = add_query_arg(
|
||||||
array(
|
array(
|
||||||
'action' => 'error_scrape',
|
'action' => 'error_scrape',
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.7-alpha-49681';
|
$wp_version = '5.7-alpha-49683';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue