Bugzilla – Attachment 189671 Details for
Bug 20638
Add audit logging for API key actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20638: (follow-up) Silence viewlog.pl warning
56e858e.patch (text/plain), 2.28 KB, created by
Martin Renvoize (ashimema)
on 2025-11-18 15:13:45 UTC
(
hide
)
Description:
Bug 20638: (follow-up) Silence viewlog.pl warning
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-11-18 15:13:45 UTC
Size:
2.28 KB
patch
obsolete
>From 56e858e63bd36ea5fd5fe71fb2952a5507b1caee Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@theke.io> >Date: Fri, 26 Sep 2025 15:45:14 -0300 >Subject: [PATCH] Bug 20638: (follow-up) Silence viewlog.pl warning >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch fixes useless warnings being printed by `viewlog.pl` I >noticed while testing this new feature. > >To test: >1. Test the feature introduced by this patchset >2. Make sure you are running: > $ ktd --shell > k$ tail -f /var/log/koha/kohadev/*.log >=> FAIL: You see things like: > >``` >[2025/09/26 18:37:39] [WARN] Use of uninitialized value in substr at /kohadevbox/koha/tools/viewlog.pl line 156. >[2025/09/26 18:37:39] [WARN] Use of uninitialized value in substr at /kohadevbox/koha/tools/viewlog.pl line 156. >[2025/09/26 18:37:39] [WARN] Use of uninitialized value in substr at /kohadevbox/koha/tools/viewlog.pl line 156. >[2025/09/26 18:37:39] [WARN] Use of uninitialized value in substr at /kohadevbox/koha/tools/viewlog.pl line 156. >[2025/09/26 18:37:39] [WARN] Use of uninitialized value in substr at /kohadevbox/koha/tools/viewlog.pl line 156. >[2025/09/26 18:43:44] [WARN] Use of uninitialized value in substr at /kohadevbox/koha/tools/viewlog.pl line 156. >[2025/09/26 18:43:44] [WARN] Use of uninitialized value in substr at /kohadevbox/koha/tools/viewlog.pl line 156. >``` >3. Refresh the viewlog page >=> FAIL: They are consistent >4. Apply this patch >5. Repeat 3 >=> SUCCESS: No more warnings! >6. Sign off :-D > >Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > tools/viewlog.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/viewlog.pl b/tools/viewlog.pl >index 26bc8af8053..770e4c47ace 100755 >--- a/tools/viewlog.pl >+++ b/tools/viewlog.pl >@@ -153,7 +153,7 @@ if ($do_it) { > $result->{'biblioitemnumber'} = q{}; > $result->{'barcode'} = q{}; > >- if ( substr( $log->info, 0, 4 ) eq 'item' ) { >+ if ( defined $log->info && substr( $log->info, 0, 4 ) eq 'item' ) { > > # get item information so we can create a working link > my $itemnumber = $log->object; >-- >2.51.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 20638
:
186540
|
186541
|
186542
|
186543
|
186544
|
186558
|
186559
|
186560
|
186561
|
186562
|
186577
|
186578
|
186579
|
186580
|
186581
|
186582
|
186583
|
186584
|
186585
|
186586
|
186587
|
186588
|
187004
|
187005
|
187006
|
187007
|
187008
|
187009
|
187011
|
187020
|
187021
|
187022
|
187023
|
187024
|
187025
|
187026
|
189658
|
189659
|
189660
|
189661
|
189662
|
189663
|
189664
|
189665
|
189666
|
189667
|
189668
|
189669
|
189670
| 189671