From 922928eb7def8016abdcb4a8b8396858421b9f71 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 21 Feb 2024 09:42:16 +0100 Subject: [PATCH] Bug 36098: Default to 'file' if pref does not exist During the installer process there is a bunch of warnings "Use of uninitialized value $storage_method in string eq at" Signed-off-by: Jonathan Druart (cherry picked from commit e2440f2c617c48d77cc416857937b6fb18c34208) Signed-off-by: Fridolin Somers (cherry picked from commit a42bce58b21c32868057dc0a45dde7580efae8f9) Signed-off-by: Lucas Gass --- Koha/Session.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Session.pm b/Koha/Session.pm index d9e9f79dd6..bb5b26e9ce 100644 --- a/Koha/Session.pm +++ b/Koha/Session.pm @@ -53,7 +53,7 @@ will be created. sub _get_session_params { my ( $class, $args ) = @_; my $storage_method = $args->{storage_method}; - $storage_method ||= C4::Context->preference('SessionStorage'); + $storage_method ||= C4::Context->preference('SessionStorage') || 'file'; if ( $storage_method eq 'mysql' ) { my $dbh = C4::Context->dbh; return { dsn => "serializer:yamlxs;driver:MySQL;id:md5", dsn_args => { Handle => $dbh } }; -- 2.39.5