Bugzilla – Attachment 44181 Details for
Bug 15087
hardduedate should not be inserted as 0000-00-00 but NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15087: make dt_from_string return undef for '0000-00-00'
Bug-15087-make-dtfromstring-return-undef-for-0000-.patch (text/plain), 942 bytes, created by
Bernardo Gonzalez Kriegel
on 2015-10-29 23:04:06 UTC
(
hide
)
Description:
Bug 15087: make dt_from_string return undef for '0000-00-00'
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-10-29 23:04:06 UTC
Size:
942 bytes
patch
obsolete
>From 5050732b1f945189422c9de6d6d9cf5a74235f28 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Thu, 29 Oct 2015 19:57:37 -0300 >Subject: [PATCH] Bug 15087: make dt_from_string return undef for '0000-00-00' > >To test: >1) Reproduce problem in description >2) Apply the patch >3) Try again, no more problems > >I don't know if this could have side effects >--- > Koha/DateUtils.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/DateUtils.pm b/Koha/DateUtils.pm >index 7a98120..01e3342 100644 >--- a/Koha/DateUtils.pm >+++ b/Koha/DateUtils.pm >@@ -53,7 +53,7 @@ to the system preferences. If the date string is empty DateTime->now is returned > sub dt_from_string { > my ( $date_string, $date_format, $tz ) = @_; > >- return if $date_string and $date_string =~ m|^0000-0|; >+ return undef if $date_string and $date_string =~ m|^0000-0|; > > $tz = C4::Context->tz unless $tz;; > >-- >1.9.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 15087
:
44181
|
44194
|
44197
|
44198
|
44244
|
52003