Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/23/2013 06:37:22 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Use strict comparisons where possible (excluding the converter code, as it needs dedicated testing.) See #2358.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/replies/capabilities.php

    r4835 r4995  
    6767
    6868                    // Post is public
    69                     if ( bbp_get_public_status_id() == $_post->post_status ) {
     69                    if ( bbp_get_public_status_id() === $_post->post_status ) {
    7070                        $caps = array( 'spectate' );
    7171
    7272                    // User is author so allow read
    73                     } elseif ( (int) $user_id == (int) $_post->post_author ) {
     73                    } elseif ( (int) $user_id === (int) $_post->post_author ) {
    7474                        $caps = array( 'spectate' );
    7575
     
    127127
    128128                // User is author so allow edit
    129                 } elseif ( (int) $user_id == (int) $_post->post_author ) {
     129                } elseif ( (int) $user_id === (int) $_post->post_author ) {
    130130                    $caps[] = $post_type->cap->edit_posts;
    131131
Note: See TracChangeset for help on using the changeset viewer.