Skip to:
Content

bbPress.org

Changeset 6829


Ignore:
Timestamp:
07/05/2018 06:17:22 AM (8 years ago)
Author:
johnjamesjacoby
Message:

Subscriptions: cast function results to (int) so strict comparisons pass.

This change fixes a bug where subscription checkboxes and UI elements could show/use incorrect values.

Props wpdennis. Fixes #3206.

Location:
trunk/src/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/forums/template.php

    r6819 r6829  
    22352235
    22362236            // Get current posts author
    2237             $post_author = bbp_get_global_post_field( 'post_author', 'raw' );
     2237            $post_author = (int) bbp_get_global_post_field( 'post_author', 'raw' );
    22382238
    22392239            // Post author is not the current user
  • trunk/src/includes/topics/template.php

    r6816 r6829  
    38543854
    38553855            // Get current posts author
    3856             $post_author = bbp_get_global_post_field( 'post_author', 'raw' );
     3856            $post_author = (int) bbp_get_global_post_field( 'post_author', 'raw' );
    38573857
    38583858            // Post author is not the current user
Note: See TracChangeset for help on using the changeset viewer.