Fix empty compatibleWith list
This is not nice, we should use have within query but that would mean we need to create our own processor. That's why I hotfix within the existing one.
This commit is contained in:
parent
c2c08480c3
commit
8d71f0862c
1 changed files with 4 additions and 0 deletions
|
@ -64,6 +64,10 @@ class NaturalSortingProcessor implements DataProcessorInterface
|
|||
throw new \Exception('Variable at "' . $variablePath . '" was not of type array.', 1667911071);
|
||||
}
|
||||
|
||||
$valuesToSort = array_filter($valuesToSort, function (array $value) use ($variableSubPath) {
|
||||
return ArrayUtility::getValueByPath($value, $variableSubPath);
|
||||
});
|
||||
|
||||
usort($valuesToSort, function (array $variable1, array $variable2) use ($variableSubPath) {
|
||||
$value1 = ArrayUtility::getValueByPath($variable1, $variableSubPath);
|
||||
$value2 = ArrayUtility::getValueByPath($variable2, $variableSubPath);
|
||||
|
|
Loading…
Reference in a new issue