Bugzilla – Attachment 150563 Details for
Bug 33649
Fix use of cronlogaction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33649: Fix use of cronlogaction
Bug-33649-Fix-use-of-cronlogaction.patch (text/plain), 1.84 KB, created by
Magnus Enger
on 2023-05-03 07:04:22 UTC
(
hide
)
Description:
Bug 33649: Fix use of cronlogaction
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2023-05-03 07:04:22 UTC
Size:
1.84 KB
patch
obsolete
>From c2304f4e90c625bdfdc5ca61ef7d9d978c921d93 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Wed, 3 May 2023 08:51:14 +0200 >Subject: [PATCH] Bug 33649: Fix use of cronlogaction > >C4::Log::cronlogaction() takes a hashref as argument, with "info" >and possibly "action" as keys. But there are a couple of places >where it is called with just a string as argument, and that does >not work. Both places need lock_exec to fail to trigger the error. >I have seen this on a production server, but not been able to >reproduce in ktd. > >To test: >- Run this on the Koha repo: grep -r "cronlogaction(" * >- Verify that fines.pl and process_message_queue.pl are the only > scripts that call cronlogaction without a hashref as argument, > but do it like this: cronlogaction( $message ); >- Apply this patch >- Run the grep again and verify that all calls to cronlogaction > now take a hashref as argument >--- > misc/cronjobs/fines.pl | 2 +- > misc/cronjobs/process_message_queue.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/fines.pl b/misc/cronjobs/fines.pl >index b141c55723..75adbe0d7a 100755 >--- a/misc/cronjobs/fines.pl >+++ b/misc/cronjobs/fines.pl >@@ -88,7 +88,7 @@ catch { > my $message = "Skipping execution of $0 ($_)"; > print STDERR "$message\n" > if $verbose; >- cronlogaction( $message ); >+ cronlogaction({ info => $message }); > exit; > }; > >diff --git a/misc/cronjobs/process_message_queue.pl b/misc/cronjobs/process_message_queue.pl >index 9250ec503a..797567c1c2 100755 >--- a/misc/cronjobs/process_message_queue.pl >+++ b/misc/cronjobs/process_message_queue.pl >@@ -80,7 +80,7 @@ catch { > my $message = "Skipping execution of $0 ($_)"; > print STDERR "$message\n" > if $verbose; >- cronlogaction( $message ); >+ cronlogaction({ info => $message }); > exit; > }; > >-- >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 33649
:
150563
|
150573
|
150577