Bugzilla – Attachment 133290 Details for
Bug 30540
Double processing invalid dates can lead to ISE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30540: eval on set_time_zone
Bug-30540-eval-on-settimezone.patch (text/plain), 923 bytes, created by
Martin Renvoize (ashimema)
on 2022-04-14 08:15:56 UTC
(
hide
)
Description:
Bug 30540: eval on set_time_zone
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-04-14 08:15:56 UTC
Size:
923 bytes
patch
obsolete
>From a06590cc3e6508606ed6e93af1c5373d57e24d74 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 14 Apr 2022 09:14:47 +0100 >Subject: [PATCH] Bug 30540: eval on set_time_zone > >This patch adds an eval around the call to set_time_zone so that we >don't crash on invalid local dates and instead just keep the passed >floating timezone. >--- > Koha/DateUtils.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/DateUtils.pm b/Koha/DateUtils.pm >index 222aa16754..acd5dd13ff 100644 >--- a/Koha/DateUtils.pm >+++ b/Koha/DateUtils.pm >@@ -293,7 +293,7 @@ sub output_pref { > # FIXME: see bug 13242 => no TZ for dates 'infinite' > if ( $dt->ymd !~ /^9999/ ) { > my $tz = $dateonly ? DateTime::TimeZone->new(name => 'floating') : C4::Context->tz; >- $dt->set_time_zone( $tz ); >+ eval { $dt->set_time_zone( $tz ); } > } > > my $pref = >-- >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 30540
:
133290
|
133292
|
133293
|
133297
|
133298
|
133299
|
133336
|
133337
|
133338