Bugzilla – Attachment 184131 Details for
Bug 40405
systempreferences.value cannot be set to NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40405: [DO NOT PUSH] Show the problem with C4::Context->set_preference
Bug-40405-DO-NOT-PUSH-Show-the-problem-with-C4Cont.patch (text/plain), 1.39 KB, created by
Jonathan Druart
on 2025-07-16 10:03:19 UTC
(
hide
)
Description:
Bug 40405: [DO NOT PUSH] Show the problem with C4::Context->set_preference
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-16 10:03:19 UTC
Size:
1.39 KB
patch
obsolete
>From 9ca01ea78fa2857e703088321a456225f9f986e2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Jul 2025 11:44:10 +0200 >Subject: [PATCH] Bug 40405: [DO NOT PUSH] Show the problem with > C4::Context->set_preference > >Apply this patch before the others and notice the failure. >--- > t/db_dependent/sysprefs.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/sysprefs.t b/t/db_dependent/sysprefs.t >index 634c09f8f7d..bfc0efb5acf 100755 >--- a/t/db_dependent/sysprefs.t >+++ b/t/db_dependent/sysprefs.t >@@ -20,7 +20,7 @@ > > use Modern::Perl; > use Test::NoWarnings; >-use Test::More tests => 10; >+use Test::More tests => 12; > use C4::Context; > use Koha::Database; > >@@ -54,6 +54,11 @@ C4::Context->set_preference( 'testpreference', 'abc' ); > C4::Context->delete_preference('testpreference'); > is( C4::Context->preference('testpreference'), undef, 'deleting preferences' ); > >+C4::Context->set_preference( 'testpreference', 'abc' ); >+is( C4::Context->preference('testpreference'), 'abc', 'testpreference set to abc' ); >+C4::Context->set_preference( 'testpreference', undef ); >+is( C4::Context->preference('testpreference'), undef, 'deleting preferences' ); >+ > # Test delete_preference, check cache; we need an example here with MIXED case ! > C4::Context->enable_syspref_cache; > C4::Context->set_preference( 'TestPreference', 'def' ); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40405
:
184129
|
184130
| 184131 |
184205