Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/10/2013 03:29:03 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Use string values when comparing against super globals. Regression introduced in r4995. See #2358.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/topics/functions.php

    r5019 r5021  
    690690
    691691        // Update revision log
    692         if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( 1 === $_POST['bbp_log_topic_edit'] ) )  {
     692        if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( "1" === $_POST['bbp_log_topic_edit'] ) )  {
    693693            $revision_id = wp_save_post_revision( $topic_id );
    694694            if ( ! empty( $revision_id ) ) {
     
    12111211
    12121212            // Shift the subscriber if told to
    1213             if ( !empty( $_POST['bbp_topic_subscribers'] ) && ( 1 === $_POST['bbp_topic_subscribers'] ) && bbp_is_subscriptions_active() )
     1213            if ( !empty( $_POST['bbp_topic_subscribers'] ) && ( "1" === $_POST['bbp_topic_subscribers'] ) && bbp_is_subscriptions_active() )
    12141214                bbp_add_user_subscription( $subscriber, $destination_topic->ID );
    12151215
     
    12311231
    12321232            // Shift the favoriter if told to
    1233             if ( !empty( $_POST['bbp_topic_favoriters'] ) && 1 === $_POST['bbp_topic_favoriters'] )
     1233            if ( !empty( $_POST['bbp_topic_favoriters'] ) && "1" === $_POST['bbp_topic_favoriters'] )
    12341234                bbp_add_user_favorite( $favoriter, $destination_topic->ID );
    12351235
     
    12481248
    12491249        // Shift the tags if told to
    1250         if ( !empty( $_POST['bbp_topic_tags'] ) && ( 1 === $_POST['bbp_topic_tags'] ) )
     1250        if ( !empty( $_POST['bbp_topic_tags'] ) && ( "1" === $_POST['bbp_topic_tags'] ) )
    12511251            wp_set_post_terms( $destination_topic->ID, $source_topic_tags, bbp_get_topic_tag_tax_id(), true );
    12521252
     
    15621562
    15631563    // Copy the subscribers
    1564     if ( !empty( $_POST['bbp_topic_subscribers'] ) && 1 === $_POST['bbp_topic_subscribers'] && bbp_is_subscriptions_active() ) {
     1564    if ( !empty( $_POST['bbp_topic_subscribers'] ) && "1" === $_POST['bbp_topic_subscribers'] && bbp_is_subscriptions_active() ) {
    15651565
    15661566        // Get the subscribers
     
    15791579
    15801580    // Copy the favoriters if told to
    1581     if ( !empty( $_POST['bbp_topic_favoriters'] ) && 1 === $_POST['bbp_topic_favoriters'] ) {
     1581    if ( !empty( $_POST['bbp_topic_favoriters'] ) && ( "1" === $_POST['bbp_topic_favoriters'] ) ) {
    15821582
    15831583        // Get the favoriters
     
    15961596
    15971597    // Copy the tags if told to
    1598     if ( !empty( $_POST['bbp_topic_tags'] ) && ( 1 === $_POST['bbp_topic_tags'] ) ) {
     1598    if ( !empty( $_POST['bbp_topic_tags'] ) && ( "1" === $_POST['bbp_topic_tags'] ) ) {
    15991599
    16001600        // Get the source topic tags
     
    20672067
    20682068            $is_sticky = bbp_is_topic_sticky( $topic_id );
    2069             $is_super  = ( empty( $is_sticky ) && !empty( $_GET['super'] ) && 1 === (int) $_GET['super'] ) ? true : false;
     2069            $is_super  = ( empty( $is_sticky ) && !empty( $_GET['super'] ) && "1" === $_GET['super'] ) ? true : false;
    20702070            $success   = $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super );
    20712071            $failure   = $is_sticky ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem sticking the topic.', 'bbpress' );
Note: See TracChangeset for help on using the changeset viewer.