| Summary: | Odd number of elements in anonymous hash at C4/Letters.pm line 827 | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
| Component: | Architecture, internals, and plumbing | Assignee: | Marcel de Rooy <m.de.rooy> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | minor | ||
| Priority: | P5 - low | ||
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: |
22.05.00
|
|
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 25790 | ||
| Attachments: |
Bug 30638: Resolve odd number in hash warn in Letters
Bug 30638: Resolve odd number in hash warn in Letters |
||
Probably related to 0000-00-00 in dateaccessioned. See 27768. Created attachment 134217 [details] [review] Bug 30638: Resolve odd number in hash warn in Letters Odd number of elements in anonymous hash at C4/Letters.pm line 827. Trivial fix. Adding undefined check on result to prevent warns on that one. No test plan. Read the patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Trivial: self SO This one had me puzzled a while ago - thx for the fix! Created attachment 134717 [details] [review] Bug 30638: Resolve odd number in hash warn in Letters Odd number of elements in anonymous hash at C4/Letters.pm line 827. Trivial fix. Adding undefined check on result to prevent warns on that one. No test plan. Read the patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Pushed to master for 22.05, thanks to everybody involved [U+1F984] No interest for stable ? |
Originating from 20.11 warnings: Odd number of elements in anonymous hash at C4/Letters.pm line 878 output_pref({ dt => dt_from_string( $replacedby ), dateonly => $dateonly }); This is line 827 on current master. If dt_from_string returns undef in list context, we get the odd number warn. Also note the following lines: if ( $letter->{ $letter_field } ) { $letter->{ $letter_field } =~ s/\Q<<$table.$field$filter_string_used>>\E/$replacedby_date/g; $letter->{ $letter_field } =~ s/\Q<<$field$filter_string_used>>\E/$replacedby_date/g; If output_pref should correctly return undef on a NULL from dt_from_string, the undefined result triggers two warnings in the regexes.