?
avatar sanderpotjer
sanderpotjer
8 Sep 2018

Steps to reproduce the issue

Came across this while testing the privacy consent plugin. The easiest way is to $query->dump() the query in https://github.com/joomla/joomla-cms/blob/3.9-dev/plugins/system/privacyconsent/privacyconsent.php#L513

Expected result

SELECT `r`.`id`,`r`.`user_id`,`u`.`email`
FROM `cxicl_privacy_consents` AS `r`
LEFT JOIN `cxicl_users` AS `u` ON u.id = r.user_id
WHERE `remind` = 0 AND DATE_ADD('2018-09-08 14:36:27', INTERVAL -323 DAY) > `created`

So the date in DATE_ADD quoted.

Actual result

SELECT `r`.`id`,`r`.`user_id`,`u`.`email`
FROM `cxicl_privacy_consents` AS `r`
LEFT JOIN `cxicl_users` AS `u` ON u.id = r.user_id
WHERE `remind` = 0 AND DATE_ADD(2018-09-08 14:36:27, INTERVAL -323 DAY) > `created`

Date in DATE_ADD is not quoted.

Additional comments

Looks like this issue is caused by this PR #21844, that removed the quotes around the date in the string returned.

//cc @alikon

avatar sanderpotjer sanderpotjer - open - 8 Sep 2018
avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Sep 2018
avatar sanderpotjer sanderpotjer - change - 8 Sep 2018
The description was changed
avatar sanderpotjer sanderpotjer - edited - 8 Sep 2018
avatar alikon
alikon - comment - 8 Sep 2018

please test #22088

avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 8 Sep 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Sep 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-09-08 15:19:10
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 8 Sep 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Sep 2018

closed as having Pull Request #22028

Add a Comment

Login with GitHub to post a comment