Bug 19821: Close filehandle after writing

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Julian Maurice 2017-12-18 09:09:58 +01:00 committed by Jonathan Druart
parent 0308261de6
commit a78c4b45e4

View file

@ -28,6 +28,7 @@ sub import {
my ($fh, $filename) = tempfile('koha-conf.XXXXXX', TMPDIR => 1, UNLINK => 1);
$xml->toFH($fh);
close $fh;
$ENV{KOHA_CONF} = $filename;
@ -45,7 +46,7 @@ sub import {
my $user = C4::Context->config('user');
my $pass = C4::Context->config('pass');
say "Create test database...";
say "Create test database $database...";
my $dbh = DBI->connect("dbi:mysql:;host=$host;port=$port", $user, $pass, {
RaiseError => 1,