Bug 22678: (follow-up) Array ref expected in context key
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 29 Aug 2022 12:51:05 +0000 (12:51 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 24 Oct 2022 17:37:05 +0000 (14:37 -0300)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Logger.pm

index e364c9c..4d2630f 100644 (file)
@@ -194,10 +194,13 @@ sub debug_to_screen {
 Mojolicous 8.23 added a "context" method, which Mojolicious will die
 on if it's missing from the logger.
 
+Note: We are just preventing a crash here not returning a new context logger.
+
 =cut
 
 sub context {
-    my $self = shift;
+    my ( $self, @context ) = @_;
+    $self->{context} = \@context;
     return $self;
 }