[Koha-bugs] [Bug 21066] Replace opac_news.timestamp by publicationdate and add updated_on as timestamp

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 26 14:08:32 CEST 2020


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

--- Comment #19 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 109151
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109151&action=edit
Bug 21066: Resolve SQL errors in strict mode

DBD::mysql::st execute failed: Incorrect integer value: '' for column
`koha_master`.`opac_news`.`number` at row 1 [for Statement "INSERT INTO
opac_news (
content,number,lang,title,branchcode,borrowernumber,expirationdate,publicationdate
) VALUES ( ?,?,?,?,?,?,?,? )" with ParamValues: 0="test", 1="", 2="", 3="test",
4=undef, 5="51", 6='2020-08-11', 7='2020-08-04'] at
/usr/share/koha/C4/NewsChannels.pm line 68.
DBD::mysql::st execute failed: Incorrect integer value: 'a' for column
`koha_master`.`opac_news`.`number` at row 1 [for Statement "UPDATE opac_news
SET lang = ?,publicationdate = ?,expirationdate = ?,number = ?,content =
?,branchcode = ?,title = ? WHERE idnew = ?;" with ParamValues: 0="",
1='2020-08-03', 2=undef, 3="a", 4="test", 5=undef, 6="test", 7="9"] at
/usr/share/koha/C4/NewsChannels.pm line 107.

Test plan:
Do not apply this patch.
Enable strict mode in koha-conf.
Add new record in tools/news leaving 'Appear in position' blank.
The record is not added; you have a warn in your plack-error log.
Apply patch and try again.

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

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


More information about the Koha-bugs mailing list