From f322b4696aa488e13685f02a53d64c6d4880e326 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 29 Aug 2022 12:51:05 +0000 Subject: [PATCH] Bug 22678: (follow-up) Array ref expected in context key Signed-off-by: Kyle M Hall --- Koha/Logger.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Koha/Logger.pm b/Koha/Logger.pm index e364c9cdb9..4d2630ff6a 100644 --- a/Koha/Logger.pm +++ b/Koha/Logger.pm @@ -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; } -- 2.30.2