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/topics/capabilities.php

    r4835 r4995  
    8585
    8686                    // Post is public
    87                     if ( bbp_get_public_status_id() == $_post->post_status ) {
     87                    if ( bbp_get_public_status_id() === $_post->post_status ) {
    8888                        $caps = array( 'spectate' );
    8989
    9090                    // User is author so allow read
    91                     } elseif ( (int) $user_id == (int) $_post->post_author ) {
     91                    } elseif ( (int) $user_id === (int) $_post->post_author ) {
    9292                        $caps = array( 'spectate' );
    9393
     
    145145
    146146                // User is author so allow edit
    147                 } elseif ( (int) $user_id == (int) $_post->post_author ) {
     147                } elseif ( (int) $user_id === (int) $_post->post_author ) {
    148148                    $caps[] = $post_type->cap->edit_posts;
    149149
Note: See TracChangeset for help on using the changeset viewer.