WordPress.org

Plugin Directory

Changeset 699078


Ignore:
Timestamp:
04/17/13 13:06:16 (12 months ago)
Author:
donncha
Message:

Fixed warnings on the action POST parameter, props @michiecat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-super-cache/trunk/wp-cache.php

    r698346 r699078  
    253253    $valid_nonce = isset($_REQUEST['_wpnonce']) ? wp_verify_nonce($_REQUEST['_wpnonce'], 'wp-cache') : false; 
    254254    // Check that garbage collection is running 
    255     if ( $valid_nonce && $_POST[ 'action' ] == 'dismiss_gc_warning' ) { 
     255    if ( $valid_nonce && isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'dismiss_gc_warning' ) { 
    256256        wp_cache_replace_line('^ *\$dismiss_gc_warning', "\$dismiss_gc_warning = 1;", $wp_cache_config_file); 
    257257        $dismiss_gc_warning = 1; 
     
    280280    // Server could be running as the owner of the wp-content directory.  Therefore, if it's 
    281281    // writable, issue a warning only if the permissions aren't 755. 
    282     if ( $valid_nonce && $_POST[ 'action' ] == 'dismiss_readable_warning' ) { 
     282    if ( $valid_nonce && isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'dismiss_readable_warning' ) { 
    283283        wp_cache_replace_line('^ *\$dismiss_readable_warning', "\$dismiss_readable_warning = 1;", $wp_cache_config_file); 
    284284        $dismiss_readable_warning = 1; 
     
    353353    } 
    354354 
    355     if ( $valid_nonce && $_POST[ 'action' ] == 'dismiss_htaccess_warning' ) { 
     355    if ( $valid_nonce && isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'dismiss_htaccess_warning' ) { 
    356356        wp_cache_replace_line('^ *\$dismiss_htaccess_warning', "\$dismiss_htaccess_warning = 1;", $wp_cache_config_file); 
    357357        $dismiss_htaccess_warning = 1; 
Note: See TracChangeset for help on using the changeset viewer.