Bug 14709: Do not access to C4::Context->userenv from the commandline
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 24 Aug 2015 09:07:37 +0000 (10:07 +0100)
committerTomas Cohen Arazi <tomascohen@unc.edu.ar>
Wed, 2 Sep 2015 13:02:33 +0000 (10:02 -0300)
commit6ad59e7ab45bbd2858f4cfad83d862688a48e49b
treebf6e591cd906203a63e0fb0641cf5ff6f2f4c3fe
parentce2ea94f304b8e3a0c5fa6c967c2b864e5d0e7bc
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
tools/export.pl