Skip to content

Instantly share code, notes, and snippets.

@paulgibbs
Created December 18, 2013 20:01
Show Gist options
  • Save paulgibbs/8028880 to your computer and use it in GitHub Desktop.
Save paulgibbs/8028880 to your computer and use it in GitHub Desktop.
diff --git a/bp-notifications/bp-notifications-classes.php b/bp-notifications/bp-notifications-classes.php
index 3aed496..4556c07 100644
--- a/bp-notifications/bp-notifications-classes.php
+++ b/bp-notifications/bp-notifications-classes.php
@@ -317,7 +317,7 @@ class BP_Notifications_Notification {
// is_new
if ( ! empty( $args['is_new'] ) ) {
$where_conditions['is_new'] = "is_new = 1";
- } elseif ( ( 0 === $args['is_new'] ) || ( false === $args['is_new'] ) ) {
+ } elseif ( isset( $args['is_new'] ) && ( 0 === $args['is_new'] || false === $args['is_new'] ) ) {
$where_conditions['is_new'] = "is_new = 0";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment