Bugzilla – Attachment 173978 Details for
Bug 38342
Koha::Object->store warning on invalid ENUM value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38342: Pass the value to exception to avoid warnings
Bug-38342-Pass-the-value-to-exception-to-avoid-war.patch (text/plain), 1.27 KB, created by
Paul Derscheid
on 2024-11-05 13:42:03 UTC
(
hide
)
Description:
Bug 38342: Pass the value to exception to avoid warnings
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-11-05 13:42:03 UTC
Size:
1.27 KB
patch
obsolete
>From 9dac9beb24f9f1b22120c52c97b5f97614283b88 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 4 Nov 2024 10:29:16 -0300 >Subject: [PATCH] Bug 38342: Pass the value to exception to avoid warnings > >This patch makes the exception on bad enum values in Koha::Object->store >not print a warning in the event of stringifying the exception. > >To test: >1. Run: > $ ktd --shell > k$ prove t/db_dependent/Koha/Booking.t >=> FAIL: You get this warnings: > >``` >Use of uninitialized value in sprintf at /kohadevbox/koha/Koha/Exceptions/Object.pm line 84. >``` >2. Apply this patch >3. Repeat 1 >=> SUCCESS: No more uninitialized values warnings >4. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > Koha/Object.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Object.pm b/Koha/Object.pm >index 0511d27157..8e254623bd 100644 >--- a/Koha/Object.pm >+++ b/Koha/Object.pm >@@ -210,6 +210,7 @@ sub store { > property => $property =~ /(\w+\.\w+)$/ > ? $1 > : $property, # results in table.column without quotes or backtics >+ value => $self->$property, > ) if $type eq 'enum'; > } > } >-- >2.39.5
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 38342
:
173919
|
173978
|
174089