Skip to content

Commit

Permalink
Fix equals values always true (#140)
Browse files Browse the repository at this point in the history
* fix equals always true

* remove fallback
  • Loading branch information
NMantek authored Nov 11, 2024
1 parent eb359d9 commit d316aac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class EqualsFieldModel extends AbstractErrorCheckModel {
*/
public function __construct(array $settings) {
$this->name = 'EqualsField';
$this->equal = filter_var($settings['equal'] ?? true, FILTER_VALIDATE_BOOLEAN) ?: true;
$this->equal = filter_var($settings['equal'] ?? true, FILTER_VALIDATE_BOOLEAN);
$this->field = GeneralUtility::trimExplode('.', strval($settings['field'] ?? ''));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class EqualsModel extends AbstractErrorCheckModel {
*/
public function __construct(array $settings) {
$this->name = 'Equals';
$this->equal = filter_var($settings['equal'] ?? true, FILTER_VALIDATE_BOOLEAN) ?: true;
$this->equal = filter_var($settings['equal'] ?? true, FILTER_VALIDATE_BOOLEAN);
$this->value = strval($settings['value'] ?? '');
}

Expand Down

0 comments on commit d316aac

Please sign in to comment.