Open brewt opened 10 years ago
Updated patch since there are some cases (eg. User search) where $crit and $crit_field aren't refs:
diff --git a/comp/widgets/listManager/listManager.mc b/comp/widgets/listManager/listManager.mc
index 216a4e4..3067411 100644
--- a/comp/widgets/listManager/listManager.mc
+++ b/comp/widgets/listManager/listManager.mc
@@ -677,7 +677,8 @@ my $build_constraints = sub {
if ($crit && $crit_field) {
# If field is an array, build a hash with the fields as the keys and
# $crit for vals
- if (ref $crit_field) {
+ if (ref $crit eq 'ARRAY' && ref $crit_field eq 'ARRAY' &&
+ @$crit == @$crit_field) {
@{$list_arg}{@$crit_field} = @$crit;
} else {
$crit_field = $def_sort_field if $crit_field eq '_default';
Don't know if this is just an issue with the Bricolage install I'm working on, but if I go to perform a Document search, then go to Jobs and search, then go back to the Document search, I get a fatal error:
And that's happening because $crit = '%'. Didn't dig deep enough to find out why that being set to that.
My fix was to check $crit and $crit_field:
But there's obviously some underlying code that's causing the search state to be messed up and should get fixed.