From 6122b60194af5b6939a6bbae6bc3c7973835b309 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 6 May 2024 12:28:45 +0000 Subject: [PATCH] Bug 36793: Fix case of $var in Context->delete_preference This only applies to 'local' preferences. Test plan (first without this patch): Add a local pref. Delete it. Ask value on commandline with: * perl -MC4::Context -e"print C4::Context->preference('YOUR_PREF')" * Did you replace YOUR_PREF :) Now repeat with this patch. And verify fix (no value now). Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer (cherry picked from commit 8ea126b1f89e24a2baf8c43f7bf837bf74741088) Signed-off-by: Fridolin Somers --- C4/Context.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Context.pm b/C4/Context.pm index 00afbb38a0..bcc1fc8269 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -486,6 +486,7 @@ was no syspref of the name. sub delete_preference { my ( $self, $var ) = @_; + $var = lc $var; if ( Koha::Config::SysPrefs->find( $var )->delete ) { if ( $use_syspref_cache ) { my $syspref_cache = Koha::Caches->get_instance('syspref'); -- 2.39.5