Skip to content
Snippets Groups Projects
Unverified Commit 07dd3e2c authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3128761 by Beakerboy, daffie, alexpott, xjm: Duplicate timestamp...

Issue #3128761 by Beakerboy, daffie, alexpott, xjm: Duplicate timestamp placeholder in statistics query
parent 4569c101
Branches
Tags
8 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards,!16Draft: Resolve #2081585 "History storage",!13Resolve #2903456
......@@ -96,7 +96,10 @@ public function import(Row $row, array $old_destination_id_values = []) {
])
->expression('daycount', 'daycount + :daycount', [':daycount' => $daycount])
->expression('totalcount', 'totalcount + :totalcount', [':totalcount' => $totalcount])
->expression('timestamp', 'CASE WHEN timestamp > :timestamp THEN timestamp ELSE :timestamp END', [':timestamp' => $timestamp])
// Per Drupal policy: "A query may have any number of placeholders, but
// all must have unique names even if they have the same value."
// https://www.drupal.org/docs/8/api/database-api/static-queries#placeholders
->expression('timestamp', 'CASE WHEN timestamp > :timestamp1 THEN timestamp ELSE :timestamp2 END', [':timestamp1' => $timestamp, ':timestamp2' => $timestamp])
->execute();
return [$row->getDestinationProperty('nid')];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment