Bug 23712: Silence warns from Koha/Illrequest/Logger.pm
authorMagnus Enger <magnus@libriotech.no>
Tue, 1 Oct 2019 14:41:31 +0000 (16:41 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 21 Oct 2019 08:43:17 +0000 (09:43 +0100)
To test:
- Run: $ sudo koha-shell -c "prove t/db_dependent/Illrequests.t" kohadev
- Observe the warnings about "no query in themelanguage"
- Apply the patch
- Run prove again
- Observe the lack of warnings about "no query in themelanguage"
  (There will be a couple of other warnings, but they are not
  related to the present bug.)

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha/Illrequest/Logger.pm

index 0625370..bdd4e8f 100644 (file)
@@ -65,8 +65,9 @@ sub new {
         }
     };
 
+    my $query = new CGI; # To keep C4::Templates::_get_template_file() from complaining
     my ( $htdocs, $theme, $lang, $base ) =
-        C4::Templates::_get_template_file('ill/log/', 'intranet');
+        C4::Templates::_get_template_file('ill/log/', 'intranet', $query);
 
     $self->{templates} = {
         STATUS_CHANGE => $base . 'status_change.tt'