Skip to:
Content

BuddyPress.org

Changeset 8171


Ignore:
Timestamp:
03/27/2014 01:13:00 PM (10 years ago)
Author:
boonebgorges
Message:

Avoid PHP notices when building is_new clause in BP_Notifications_Notification::get()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-notifications/bp-notifications-classes.php

    r8167 r8171  
    320320
    321321        // is_new
    322         if ( 'both' !== $args['is_new'] ) {
    323             if ( ! empty( $args['is_new'] ) ) {
    324                 $where_conditions['is_new'] = "is_new = 1";
    325             } elseif ( isset( $args['is_new'] ) && ( 0 === $args['is_new'] || false === $args['is_new'] ) ) {
    326                 $where_conditions['is_new'] = "is_new = 0";
    327             }
     322        if ( ! empty( $args['is_new'] ) && 'both' !== $args['is_new'] ) {
     323            $where_conditions['is_new'] = "is_new = 1";
     324        } elseif ( isset( $args['is_new'] ) && ( 0 === $args['is_new'] || false === $args['is_new'] ) ) {
     325            $where_conditions['is_new'] = "is_new = 0";
    328326        }
    329327
Note: See TracChangeset for help on using the changeset viewer.