Skip to content

Commit

Permalink
fix addObjectListCondition for UserRegistrationDateIntervalCondition
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaruesweg authored Jan 29, 2017
1 parent b2dc8d7 commit 3d63cc3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public function addObjectListCondition(DatabaseObjectList $objectList, array $co
throw new \InvalidArgumentException("Object list is no instance of '".UserList::class."', instance of '".get_class($objectList)."' given.");
}

if ($conditionData['greaterThan'] !== null) {
if (isset($conditionData['greaterThan'])) {
$objectList->getConditionBuilder()->add('user_table.registrationDate < ?', [TIME_NOW - $conditionData['greaterThan'] * 86400]);
}
if ($conditionData['lessThan'] !== null) {
if (isset($conditionData['lessThan'])) {
$objectList->getConditionBuilder()->add('user_table.registrationDate > ?', [TIME_NOW - $conditionData['lessThan'] * 86400]);
}
}
Expand Down

0 comments on commit 3d63cc3

Please sign in to comment.