[Koha-bugs] [Bug 17933] Internal software error when searching patron without birth date

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 18 18:14:54 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17933

--- Comment #2 from Dobrica Pavlinusic <dpavlin at rot13.org> ---
Created attachment 59172
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59172&action=edit
Bug 17933 - Internal software error when searching patron without birth date

When patrons don't have date of birth (which is not required) patron
search results on moremember page produce internal server error since we
can't convert MySQL invalid date 0000-00-00 to datetime object and
call strfdate on it.

Additionally, since we assign dates to template variables and after
than assign whole $data hash to template, later assigment overrides
previous one, so we see birth date field even for patrons which don't
have one.

This patch fixes both of those problems.

Test:
1. edit patron and remove it's birth date
2. try to search for it, and verify server error
3. apply patch
4. repeat search for patron and verify that it works and doesn't
   have enpty birth date field

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list