Fixes a bug in HasAction->searchAction that caused actions not to be found if no groupTitle was given.

This commit is contained in:
Vassyli
2021-02-04 14:44:18 +01:00
committed by Basilius Sauter
parent 75dd7494c3
commit 99d554e5d7
+1 -2
View File
@@ -78,8 +78,7 @@ class HasAction extends Constraint
$checkedOnce = True;
}
# Using KNF, !A or B is only false if A is true and B is not.
if ($action->$methodToCheck() == $valueToHave and (!is_null($groupTitle) or $group->getTitle() === $groupTitle)) {
if ($action->$methodToCheck() == $valueToHave and (is_null($groupTitle) or $group->getTitle() === $groupTitle)) {
$found = $action;
}
}