Skip to content

Commit f28e2e5

Browse files
authored
Change boolean property to int
1 parent 8780033 commit f28e2e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/components/tagger/elements/snippets/taggergetresourceswhere.snippet.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
$tagField = $modx->getOption('tagField', $scriptProperties, 'alias');
3232
$likeComparison = (int) $modx->getOption('likeComparison', $scriptProperties, 0);
3333
$matchAll = (int) $modx->getOption('matchAll', $scriptProperties, 0);
34-
$errorOnInvalidTags = $modx->getOption('errorOnInvalidTags', $scriptProperties, false);
34+
$errorOnInvalidTags = (int) $modx->getOption('errorOnInvalidTags', $scriptProperties, 0);
3535
$field = $modx->getOption('field', $scriptProperties, 'id');
3636
$where = $modx->fromJSON($where);
3737
if ($where == false) {
@@ -132,7 +132,7 @@
132132

133133
if (count($tagIDs) == 0) {
134134
$tagIDs[] = 0;
135-
if($errorOnInvalidTags)
135+
if($errorOnInvalidTags == 1)
136136
$modx->sendForward($modx->getOption('error_page'),array('response_code' => 'HTTP/1.1 404 Not Found'));
137137
}
138138

@@ -142,4 +142,4 @@
142142
$where[] = "EXISTS (SELECT 1 as found FROM {$modx->getTableName('TaggerTagResource')} r WHERE r.tag IN (" . implode(',', $tagIDs) . ") AND r.resource = modResource." . $field . " GROUP BY found HAVING count(found) = " . $tagsCount . ")";
143143
}
144144

145-
return $modx->toJSON($where);
145+
return $modx->toJSON($where);

0 commit comments

Comments
 (0)