It's quite common to have [something] within facet data, and it produces 
following error:

Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE

This problem was intoduced in Bug 12151 but is trivial to fix.
---
 C4/Search.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index 1b5c6fa..219de1e 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -532,7 +532,7 @@ sub getRecords {
                                 foreach my $field (@fields) {
                                     my $data = $field->as_string( 
$subfield_letters, $facet->{sep} );
 
-                                    unless ( grep { /^$data$/ } @used_datas ) {
+                                    unless ( grep { /^\Q$data\E$/ } 
@used_datas ) {
                                         push @used_datas, $data;
                                         $facets_counter->{ $facet->{idx} 
}->{$data}++;
                                     }
-- 
1.7.2.5

_______________________________________________
Koha-patches mailing list
Koha-patches@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to