fix addObjectListCondition for UserRegistrationDateIntervalCondition
authorJoshua Rüsweg <josh@wcflabs.de>
Sun, 29 Jan 2017 22:22:51 +0000 (23:22 +0100)
committerGitHub <noreply@github.com>
Sun, 29 Jan 2017 22:22:51 +0000 (23:22 +0100)
wcfsetup/install/files/lib/system/condition/UserRegistrationDateIntervalCondition.class.php

index eb8b760ae762e359146d104135dd8fca75f5647f..2d46da369eb747e933889e3108516203d960f112 100644 (file)
@@ -36,10 +36,10 @@ class UserRegistrationDateIntervalCondition extends AbstractIntegerCondition imp
                        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]);
                }
        }