| Summary: | t/Edifact.t generates warnings | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
| Component: | Test Suite | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
| Status: | RESOLVED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | david, fridolin.somers, martin.renvoize |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: |
25.11.00,25.05.03
|
|
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 40387 | ||
| Attachments: |
Bug 40386: Remove warnings from EDI when running tests
Bug 40386: Remove warnings from EDI when running tests |
||
|
Description
Jonathan Druart
2025-07-15 12:39:10 UTC
Created attachment 184374 [details] [review] Bug 40386: Remove warnings from EDI when running tests This patch fixes several warnings that occur when running Edifact tests: 1. Changed `my $self = ()` to `my $self = {}` in Koha::Edifact constructor to properly initialize as hashref instead of empty list 2. Added null/empty checks in Koha::Edifact::Segment::_parse_seg() to prevent warnings when processing undefined or empty segments 3. Added null/empty checks in Koha::Edifact::Segment::_get_elements() to handle undefined segments gracefully 4. Added Test::NoWarnings to t/Edifact.t to catch any remaining warnings These changes eliminate "Use of uninitialized value" warnings and ensure clean test runs without affecting EDI functionality. Test plan: 1. Run prove t/Edifact.t and verify no warnings are displayed 2. Test EDI message processing to ensure no regression Created attachment 184549 [details] [review] Bug 40386: Remove warnings from EDI when running tests This patch fixes several warnings that occur when running Edifact tests: 1. Changed `my $self = ()` to `my $self = {}` in Koha::Edifact constructor to properly initialize as hashref instead of empty list 2. Added null/empty checks in Koha::Edifact::Segment::_parse_seg() to prevent warnings when processing undefined or empty segments 3. Added null/empty checks in Koha::Edifact::Segment::_get_elements() to handle undefined segments gracefully 4. Added Test::NoWarnings to t/Edifact.t to catch any remaining warnings These changes eliminate "Use of uninitialized value" warnings and ensure clean test runs without affecting EDI functionality. Test plan: 1. Run prove t/Edifact.t and verify no warnings are displayed 2. Test EDI message processing to ensure no regression Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice work everyone! Pushed to main for 25.11 Nice work everyone! Pushed to 25.05.x Skip for 24.11.x Test suite related, no changes to the manual required. |