From d84d27658795d4c371510cb0cf470984546fa87f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 Jun 2025 12:30:36 +0200 Subject: [PATCH] Bug 39712: Remove warnings [WARN] Use of uninitialized value $view in exists at /kohadevbox/koha/Koha/Manual.pm line 346. Signed-off-by: Aude Charillon Signed-off-by: Nick Clemens Signed-off-by: Lucas Gass (cherry picked from commit 7ca66bf7199d4ef8e03c8455d501868df6c9d453) Signed-off-by: Paul Derscheid --- Koha/Manual.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Manual.pm b/Koha/Manual.pm index 728b11f56d..9aa73fa5d3 100644 --- a/Koha/Manual.pm +++ b/Koha/Manual.pm @@ -340,9 +340,9 @@ sub get_url { my $base_url = _get_base_url($preferred_language); return $base_url . ( - exists $mapping->{$view} ? $mapping->{$view} - : exists $mapping->{$file} ? $mapping->{$file} - : $mapping->{mainpage} + ( defined $view && exists $mapping->{$view} ) ? $mapping->{$view} + : ( exists $mapping->{$file} ) ? $mapping->{$file} + : $mapping->{mainpage} ); }