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 <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-02-21 09:42:16 +01:00
parent c42ede262a
commit e2440f2c61
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0

View file

@ -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 } };