Summary: | Use of uninitialized value $record_type in string eq | ||
---|---|---|---|
Product: | Koha | Reporter: | Slava Shishkin <slavashishkin> |
Component: | Tools | Assignee: | Slava Shishkin <slavashishkin> |
Status: | CLOSED FIXED | QA Contact: | Victor Grousset/tuxayo <victor> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, tomascohen, victor |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the cause of an error message that appears in the system logs every time that Tools > Catalog > Export data (/cgi-bin/koha/tools/export.pl) is accessed. The error message was "AH01215: Use of uninitialized value $record_type in string eq at /kohadevbox/koha/tools/export.pl line 43.: /kohadevbox/koha/tools/export.pl,...".
|
Version(s) released in: |
22.11.00
|
Bug Depends on: | |||
Bug Blocks: | 25790 | ||
Attachments: |
Bug 31000: HOTFIX. Warn removal: param record_type can be undef
Bug 31000: HOTFIX. Warn removal: param record_type can be undef Bug 31000: HOTFIX. Warn removal: param record_type can be undef Bug 31000: HOTFIX. Warn removal: param record_type can be undef Bug 31000: Warn removal: param record_type can be undef |
Description
Slava Shishkin
2022-06-21 10:38:39 UTC
Created attachment 136388 [details] [review] Bug 31000: HOTFIX. Warn removal: param record_type can be undef Use of uninitialized value $record_type in string eq at .../tools/export.pl line 43. Created attachment 136389 [details] [review] Bug 31000: HOTFIX. Warn removal: param record_type can be undef Uninitialized value warning on /tools/export.pl when $record_type is undef Use of uninitialized value $record_type in string eq at /home/vagrant/kohaclone/tools/export.pl line 43. This patch fixes it by working when $record_type is Undef. The functionality still remains the same but warning doesn't flood error log. To reproduce: 1. Go to export data tool page (/tools/export.pl). 2. Check the error log and find the upper mentioned warning, check the timestamp to ensure that it was added when you loaded the page. 3. Apply the patch. 4. Load the page again, ensure that the same warning doesn't get added to the log file again. Hi Slava, should this be 'needs sign-off'? Hi Katrin, yep, my bad. It should this be 'needs sign-off'. Thanks :) Created attachment 136557 [details] [review] Bug 31000: HOTFIX. Warn removal: param record_type can be undef Uninitialized value warning on /tools/export.pl when $record_type is undef Use of uninitialized value $record_type in string eq at /home/vagrant/kohaclone/tools/export.pl line 43. This patch fixes it by working when $record_type is Undef. The functionality still remains the same but warning doesn't flood error log. To reproduce: 1. Go to export data tool page (/tools/export.pl). 2. Check the error log and find the upper mentioned warning, check the timestamp to ensure that it was added when you loaded the page. 3. Apply the patch. 4. Load the page again, ensure that the same warning doesn't get added to the log file again. Signed-off-by: David Nind <david@davidnind.com> Testing notes (using koha-testing-docker): - The error message appears in this log file: /var/log/koha/kohadev/intranet-error.log Created attachment 136568 [details] [review] Bug 31000: HOTFIX. Warn removal: param record_type can be undef Uninitialized value warning on /tools/export.pl when $record_type is undef Use of uninitialized value $record_type in string eq at /home/vagrant/kohaclone/tools/export.pl line 43. This warning in koha-testing-docker appears in: /var/log/koha/kohadev/intranet-error.log This patch fixes it by working when $record_type is Undef. The functionality still remains the same but warning doesn't flood error log. To reproduce: 1. Go to export data tool page (/tools/export.pl). 2. Check the error log and find the upper mentioned warning, check the timestamp to ensure that it was added when you loaded the page. 3. Apply the patch. 4. Load the page again, ensure that the same warning doesn't get added to the log file again. Signed-off-by: David Nind <david@davidnind.com> David, thanks for the note. I added it to the patch description. Created attachment 137459 [details] [review] Bug 31000: Warn removal: param record_type can be undef Uninitialized value warning on /tools/export.pl when $record_type is undef Use of uninitialized value $record_type in string eq at /home/vagrant/kohaclone/tools/export.pl line 43. This warning in koha-testing-docker appears in: /var/log/koha/kohadev/intranet-error.log This patch fixes it by working when $record_type is Undef. The functionality still remains the same but warning doesn't flood error log. To reproduce: 1. Go to export data tool page (/tools/export.pl). 2. Check the error log and find the upper mentioned warning, check the timestamp to ensure that it was added when you loaded the page. 3. Apply the patch. 4. Load the page again, ensure that the same warning doesn't get added to the log file again. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Removed "HOTFIX" from commit message. qa script happy, code looks good, passing QA :) Thanks, Victor! :) Pushed to master for 22.11. Nice work everyone, thanks! |