From 41d84f621d44e9ddff16da1764bbdbfbdd1e306e Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 15 Apr 2026 06:25:16 +0000 Subject: [PATCH] Bug 42366: Fix debug_mode test for koha-conf.xml This patch fixes the debug_mode test for koha-conf.xml, so that 0 works properly. Test plan: 0. Do not apply the patch 1. sudo vi /etc/koha/sites/kohadev/koha-conf.xml 2. Change 1 to 0 3. sudo koha-plack --restart kohadev 4. ps -efww | grep "starman" 5. Note that starman is still in development mode 6. Apply the patch 7. sudo koha-plack --restart kohadev 8. ps -efww | grep "starman" 9. Note that starman is now in deployment mode Note: this is important because running a production system in debug/development mode can be a security risk! Signed-off-by: Martin Renvoize Signed-off-by: Lucas Gass --- debian/scripts/koha-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh index fbfe788604..ef138fce9b 100755 --- a/debian/scripts/koha-functions.sh +++ b/debian/scripts/koha-functions.sh @@ -414,7 +414,7 @@ is_debug_mode() if [ "$instancename" != "" ] && is_instance $instancename; then debug_mode=$(run_safe_xmlstarlet $instancename debug_mode) fi - if [ -n "$debug_mode" ] && [ "debug_mode" != "0" ]; then + if [ -n "$debug_mode" ] && [ "$debug_mode" != "0" ]; then return 0; # true else return 1