Summary: | Fix a noisy warn in catalogue/MARCdetail | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Architecture, internals, and plumbing | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | BLOCKED --- | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | dcook, jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 40559: Fix noisy warning in MARCdetail
Bug 40559: cleanup |
Description
Marcel de Rooy
2025-07-31 07:54:05 UTC
Created attachment 184919 [details] [review] Bug 40559: Fix noisy warning in MARCdetail Rebased for 25.06. Resolves: [2025/07/31 10:59:02] [WARN] Use of uninitialized value in string eq at /usr/share/koha/catalogue/MARCdetail.pl line 203. Test plan: Check if warn disappears with this patch. Trigger the warn by opening catalogue/MARCdetail on staff view. (Should be enough with a normal MARC record.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Trivial. Self SO Created attachment 186407 [details] [review] Bug 40559: cleanup Would you accept this follow-up? Also wondering.... next if ( $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] }->{tab} // q{} ) ne $tabloop; # Note: defaulting to '0' changes behavior! Why? Will check (In reply to Jonathan Druart from comment #4) > Would you accept this follow-up? I feel that we should move it on its own report. The noisy warning patch is just about 1 line of code (-1,+3) and can be backported. The cleanup could go on its own and would be an enhancement, right? (In reply to Jonathan Druart from comment #5) > Also wondering.... > > next > if ( $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] > }->{tab} // q{} ) ne > $tabloop; # Note: defaulting to '0' changes behavior! > > Why? Since tabloop can be zero? Or do you mean something else? (In reply to Marcel de Rooy from comment #8) > (In reply to Jonathan Druart from comment #5) > > Also wondering.... > > > > next > > if ( $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] > > }->{tab} // q{} ) ne > > $tabloop; # Note: defaulting to '0' changes behavior! > > > > Why? > > Since tabloop can be zero? Or do you mean something else? The if syntax: next if ( $var ) ne $tabloop; |