mirror of
https://github.com/processwire/processwire.git
synced 2025-08-23 06:44:38 +02:00
Attempt fix for issue mentioned by @Rayden in processwire/processwire-issues#1207
This commit is contained in:
@@ -771,7 +771,7 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
|
|||||||
/**
|
/**
|
||||||
* Get match query
|
* Get match query
|
||||||
*
|
*
|
||||||
* @param DatabaseQuerySelect $query
|
* @param DatabaseQuerySelect|PageFinderDatabaseQuerySelect $query
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @param string $subfield
|
* @param string $subfield
|
||||||
* @param string $operator
|
* @param string $operator
|
||||||
@@ -789,6 +789,7 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
|
|||||||
$isFindOperator = $compareType & Selector::compareTypeFind;
|
$isFindOperator = $compareType & Selector::compareTypeFind;
|
||||||
$isInvalidOperator = false;
|
$isInvalidOperator = false;
|
||||||
$isInvalidSubfield = false;
|
$isInvalidSubfield = false;
|
||||||
|
$originalOperator = $operator;
|
||||||
|
|
||||||
unset($schema['keys'], $schema['xtra']);
|
unset($schema['keys'], $schema['xtra']);
|
||||||
|
|
||||||
@@ -839,6 +840,12 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($operator !== $originalOperator) {
|
||||||
|
// operator can change above (i.e. getMatchQuerySubfield)
|
||||||
|
$compareType = Selectors::getOperators(array('getValueType' => 'compareType', 'operator' => $operator));
|
||||||
|
$isFindOperator = $compareType & Selector::compareTypeFind;
|
||||||
|
}
|
||||||
|
|
||||||
if($isInvalidSubfield) {
|
if($isInvalidSubfield) {
|
||||||
throw new PageFinderSyntaxException("Property '$subfield' not recognized in: $query->selector");
|
throw new PageFinderSyntaxException("Property '$subfield' not recognized in: $query->selector");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user