From 6d16a1c9e56bd9bc9df2ff118e83c7f8f4e2ca03 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 Content-Type: text/plain; charset=utf-8 --- Koha/Logger.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Koha/Logger.pm b/Koha/Logger.pm index 80ed48f56f..8912360bb7 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.20.1