Skip to:
Content

BuddyPress.org

Changeset 7254


Ignore:
Timestamp:
07/09/2013 06:10:24 PM (11 years ago)
Author:
nacin
Message:

Only delete the bp-message and bp-message-type cookies when they are currently set. Otherwise, Set-Cookie headers are always issued, which messes with caching proxies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7/bp-core/bp-core-functions.php

    r7025 r7254  
    367367    add_action( 'template_notices', 'bp_core_render_message' );
    368368
    369     @setcookie( 'bp-message',      false, time() - 1000, COOKIEPATH );
    370     @setcookie( 'bp-message-type', false, time() - 1000, COOKIEPATH );
     369    if ( isset( $_COOKIE['bp-message'] ) )
     370        @setcookie( 'bp-message', false, time() - 1000, COOKIEPATH );
     371    if ( isset( $_COOKIE['bp-message-type'] ) )
     372        @setcookie( 'bp-message-type', false, time() - 1000, COOKIEPATH );
    371373}
    372374add_action( 'bp_actions', 'bp_core_setup_message', 5 );
Note: See TracChangeset for help on using the changeset viewer.