Bugzilla – Attachment 134920 Details for
Bug 30734
t/db_dependent/Koha/BackgroundJob.t fails on D9 and D10
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30734: Fix BackgroundJob.t
Bug-30734-Fix-BackgroundJobt.patch (text/plain), 1.20 KB, created by
Marcel de Rooy
on 2022-05-12 08:40:18 UTC
(
hide
)
Description:
Bug 30734: Fix BackgroundJob.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-05-12 08:40:18 UTC
Size:
1.20 KB
patch
obsolete
>From 60337e6a5274a402c45a2c8fc420fa4d9c482fe0 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 12 May 2022 08:38:15 +0000 >Subject: [PATCH] Bug 30734: Fix BackgroundJob.t >Content-Type: text/plain; charset=utf-8 > >Added test for empty string or undefined. We could still consider >evaling the json operations. > >Test plan: >Run t/db_dependent/Koha/BackgroundJob.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/BackgroundJob.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index a84ca42c58..517c54f010 100644 >--- a/Koha/BackgroundJob.pm >+++ b/Koha/BackgroundJob.pm >@@ -245,7 +245,7 @@ Returns the decoded JSON contents from $self->data. > sub decoded_data { > my ($self) = @_; > >- return decode_json($self->data); >+ return $self->data ? decode_json( $self->data ) : undef; > } > > =head3 set_encoded_data >@@ -259,7 +259,7 @@ Serializes I<$data> as a JSON string and sets the I<data> attribute with it. > sub set_encoded_data { > my ( $self, $data ) = @_; > >- return $self->data( encode_json($data) ); >+ return $self->data( $data ? encode_json($data) : undef ); > } > > =head3 job_type >-- >2.20.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 30734
: 134920