Skip to:
Content

BuddyPress.org

Changeset 12106


Ignore:
Timestamp:
05/21/2018 01:03:05 AM (7 years ago)
Author:
djpaul
Message:

Templates, Nouveau: use strict type checking for in_array() calls.

Location:
trunk/src/bp-templates/bp-nouveau/includes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/activity/functions.php

    r12104 r12106  
    418418
    419419                // The current activity is one of the new mentions
    420                 if ( is_array( $new_mentions ) && in_array( bp_get_activity_id(), $new_mentions ) ) {
     420                if ( is_array( $new_mentions ) && in_array( bp_get_activity_id(), $new_mentions, true ) ) {
    421421                    $my_classes[] = 'bp-my-mentions';
    422422                }
  • trunk/src/bp-templates/bp-nouveau/includes/activity/template-tags.php

    r12104 r12106  
    563563        }
    564564
    565         if ( isset( $return['activity_spam'] ) && ! in_array( $activity_type, BP_Akismet::get_activity_types() ) ) {
     565        if ( isset( $return['activity_spam'] ) && ! in_array( $activity_type, BP_Akismet::get_activity_types(), true ) ) {
    566566            unset( $return['activity_spam'] );
    567567        }
  • trunk/src/bp-templates/bp-nouveau/includes/activity/widgets.php

    r12104 r12106  
    193193            <select class="widefat" multiple="multiple" id="<?php echo $this->get_field_id( 'type' ); ?>" name="<?php echo $this->get_field_name( 'type' ); ?>[]">
    194194                <?php foreach ( bp_nouveau_get_activity_filters() as $key => $name ) : ?>
    195                     <option value="<?php echo esc_attr( $key ); ?>" <?php selected( in_array( $key, $type ) ); ?>><?php echo esc_html( $name ); ?></option>
     195                    <option value="<?php echo esc_attr( $key ); ?>" <?php selected( in_array( $key, $type, true ) ); ?>><?php echo esc_html( $name ); ?></option>
    196196                <?php endforeach; ?>
    197197            </select>
  • trunk/src/bp-templates/bp-nouveau/includes/groups/functions.php

    r12104 r12106  
    225225            $response['can_edit'] = true;
    226226        } else {
    227             $response['can_edit'] = in_array( bp_loggedin_user_id(), $inviter_ids );
     227            $response['can_edit'] = in_array( bp_loggedin_user_id(), $inviter_ids, true );
    228228        }
    229229    }
  • trunk/src/bp-templates/bp-nouveau/includes/messages/functions.php

    r12104 r12106  
    296296    }
    297297
    298     if ( $notice->id && is_array( $closed_notices ) && ! in_array( $notice->id, $closed_notices ) ) {
     298    if ( $notice->id && is_array( $closed_notices ) && ! in_array( $notice->id, $closed_notices, true ) ) {
    299299        // Inject the notice into the template_message if no other message has priority.
    300300        $bp = buddypress();
Note: See TracChangeset for help on using the changeset viewer.