From 64c89369d0a7ab563172ee76cef69258c01318ee 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 --- C4/Context.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Context.pm b/C4/Context.pm index 0169b10f85e..98be1b06eb9 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.45.0