You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Can't use string ("%") as an ARRAY ref while "strict refs" in use at bricolage/comp/widgets/listManager/listManager.mc line 681.
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:
diff --git a/comp/widgets/listManager/listManager.mc b/comp/widgets/listManager/listManager.mc
index 47f7cc6..04b2801 100755
--- a/comp/widgets/listManager/listManager.mc
+++ b/comp/widgets/listManager/listManager.mc
@@ -679,7 +679,9 @@ my $build_constraints = sub {
my $list_arg = {};
# If any criteria were passed then we need to constrain our list.
- if ($crit && $crit_field) {
+ if ($crit && $crit_field &&
+ ref $crit eq 'ARRAY' && ref $crit_field eq 'ARRAY' &&
+ @$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) {
But there's obviously some underlying code that's causing the search state to be messed up and should get fixed.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: