mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 12:14:25 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@49683 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -641,7 +641,9 @@ if ( isset( $_GET['error'] ) ) :
|
||||
<div id="message" class="error"><p><?php echo $errmsg; ?></p>
|
||||
<?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(
|
||||
array(
|
||||
'action' => 'error_scrape',
|
||||
|
||||
Reference in New Issue
Block a user