]> git.koha-community.org Git - koha.git/commit
Bug 14637: Fix add patron category under MySQL 5.7
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 6 Sep 2016 09:40:46 +0000 (10:40 +0100)
committerKatrin Fischer <katrin.fischer.83@web.de>
Tue, 3 Jan 2017 23:34:37 +0000 (23:34 +0000)
commitfae4342fdfec11f8c4a1a340ed23d1a0b6d7cdab
tree275cbc3296da720c1dc364d0b8f7f44735e24986
parentf605be1cdd7000e32724aafc34c83be9718d5c3d
Bug 14637: Fix add patron category under MySQL 5.7

If no dateofbirthrequired or upperagelimit is set on the interface, the
->store method will receive an empty string defined for these values.
For INT field, we must explicitely set these empty value to undef
instead to avoid MySQL 5.7 (and strict mode) to raise:
  DBD::mysql::st execute failed: Incorrect integer value: ' for column
'dateofbirthrequired''

Test plan:
Using MySQL 5.7 (and/or sql_mode=STRICT_TRANS_TABLES)
Create a patron category without specifying upperagelimit or
dateofbirthrequired

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a28334aeceba9ea8fcfcd301c4c01f473110bbe3)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Koha/Patron/Category.pm