Bug 11269 - Latest MARC::Record makes visible some wrong usage of field->subfield in C4::Search
Summary: Latest MARC::Record makes visible some wrong usage of field->subfield in C4::...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Target Milestone: ---
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-18 22:04 UTC by Tomás Cohen Arazi
Modified: 2014-12-07 20:05 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11269 - Latest MARC::Record makes visible some wrong usage of field->subfield in C4::Search (1.06 KB, patch)
2013-11-18 22:06 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 11269 - Latest MARC::Record makes visible some wrong usage of field->subfield in C4::Search (1.12 KB, patch)
2013-11-18 22:32 UTC, Liz Rea
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2013-11-18 22:04:47 UTC
To reproduce:
- Run prove -v t/db_dependent/Search.t
- There will be warnings about "Use of uninitialized value $code_wanted in string" in MARC::Field.
Comment 1 Tomás Cohen Arazi 2013-11-18 22:06:21 UTC Comment hidden (obsolete)
Comment 2 Liz Rea 2013-11-18 22:32:10 UTC
Created attachment 23009 [details] [review]
Bug 11269 - Latest MARC::Record makes visible some wrong usage of field->subfield in C4::Search

To test:
- Run prove -v t/db_dependent/Search.t
- There will be warnings about "Use of uninitialized value $code_wanted in string" in MARC::Field.
- Apply the patch.
- Those warnings are gone.

Regards
To+

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tests now pass
Comment 3 Galen Charlton 2013-11-19 16:29:39 UTC
I've pushed this to master and 3.14.x.  Thanks, Tomás!
Comment 4 Tomás Cohen Arazi 2013-11-20 16:43:17 UTC
This patch has been pushed to 3.12.x, will be in 3.12.7.
Comment 5 M. Tompsett 2013-11-23 02:25:29 UTC
I added bug 11269 and bug 11183 into their respective see also's, because I believe the second patch in 11183 may solve the same thing this patch does, just at a later point in the code. If so, I believe the second patch to 11183 should be obsoleted. Could someone else check that please?
Comment 6 Fridolin SOMERS 2014-03-26 11:02:20 UTC
@Galen,
The module MARC::Record should also be fixed no ?
Test if $code_wanted is not undef in subfield().