Skip to content

Commit 388be41

Browse files
committed
Fix the direction of the comparison
1 parent 4acb7a3 commit 388be41

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

wcfsetup/install/files/lib/system/condition/type/user/RegistrationDaysUserConditionType.class.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function applyFilter(DatabaseObjectList $objectList): void
3737
["condition" => $condition, "timestamp" => $timestamp] = $this->getParsedFilter();
3838

3939
$objectList->getConditionBuilder()->add(
40-
"? {$condition} {$objectList->getDatabaseTableAlias()}.registrationDate",
40+
"{$objectList->getDatabaseTableAlias()}.registrationDate {$condition} ?",
4141
[$timestamp]
4242
);
4343
}
@@ -48,10 +48,10 @@ public function matches(object $object): bool
4848
["condition" => $condition, "timestamp" => $timestamp] = $this->getParsedFilter();
4949

5050
return match ($condition) {
51-
'>' => $timestamp > $object->registrationDate,
52-
'<' => $timestamp < $object->registrationDate,
53-
'>=' => $timestamp >= $object->registrationDate,
54-
'<=' => $timestamp <= $object->registrationDate,
51+
'>' => $object->registrationDate > $timestamp,
52+
'<' => $object->registrationDate < $timestamp,
53+
'>=' => $object->registrationDate >= $timestamp,
54+
'<=' => $object->registrationDate <= $timestamp,
5555
default => throw new \InvalidArgumentException("Unknown condition: {$condition}"),
5656
};
5757
}

0 commit comments

Comments
 (0)