Bug 14709 - The export tool is broken if used from the command line
Summary: The export tool is broken if used from the command line
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 13040
Blocks: 14722
  Show dependency treegraph
 
Reported: 2015-08-24 09:06 UTC by Jonathan Druart
Modified: 2016-06-21 21:38 UTC (History)
4 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:


Attachments
Bug 14709: Do not access to C4::Context->userenv from the commandline (1.17 KB, patch)
2015-08-24 09:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Patch fixes the bug. I don't see any side effects caused by the fix. (1.31 KB, patch)
2015-08-24 12:35 UTC, j.kylmala
Details | Diff | Splinter Review
[PASSED QA] Bug 14709: Do not access to C4::Context->userenv from the commandline (1.38 KB, patch)
2015-09-01 22:25 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2015-08-24 09:06:31 UTC
The script dies with
  Can't use an undefined value as a HASH reference at tools/export.pl line 149.
if it is called from the command line.

This is introduced by bug 13040.

The C4::Context->userenv is not defined in this case.
Comment 1 Jonathan Druart 2015-08-24 09:07:19 UTC
The severity could be increased to critical if someone occurs the issue.
Comment 2 Jonathan Druart 2015-08-24 09:09:22 UTC Comment hidden (obsolete)
Comment 3 j.kylmala 2015-08-24 12:35:33 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2015-09-01 22:25:37 UTC
Created attachment 42185 [details] [review]
[PASSED QA] Bug 14709: Do not access to C4::Context->userenv from the commandline

The script dies with
  Can't use an undefined value as a HASH reference at tools/export.pl
line 149.
if it is called from the command line.

This is introduced by bug 13040.

The C4::Context->userenv is not defined in this case.

Test plan:
Execute the script using the command line.
With the patch applies you should not get the error.

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2015-09-02 14:09:59 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 6 Chris Cormack 2015-09-22 01:27:37 UTC
Pushed to 3.20.x will be in 3.20.4