[Koha-bugs] [Bug 35792] New: Quiet warning: Use of uninitialized value $sub6

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 12 15:26:14 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792

            Bug ID: 35792
           Summary: Quiet warning: Use of uninitialized value $sub6
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5 - low
         Component: Searching - Elasticsearch
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: magnus at libriotech.no

When reindexing Elasticsearch, this warning can sometimes be seen: 

Use of uninitialized value $sub6 in pattern match (m//) at
/usr/share/koha/lib/Koha/SearchEngine/Elasticsearch.pm line 601.

This warning is from 23.05.06. In master it looks like the relevant line is now
line 603. I think it could be silenced by changing the line from this: 

if ($sub6 =~ /^(...)-\d+/) {

to this: 

if ($sub6 && $sub6 =~ /^(...)-\d+/) {

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list