From 1029081b28051b7fb82d5eac89c6e40d1a6e6be4 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 5 Dec 2018 06:12:08 -0800 Subject: [PATCH] Correct two straggling "%Q" + "implode(...)" callsites in Revision updates Summary: See . When creating or updating revisions, we do some manual query construction to update the affected path table. Update these queries to modern `qsprintf()`. Test Plan: Created and updated revisions affecting paths, no more logs in the webserver log. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D19846 --- .../differential/editor/DifferentialTransactionEditor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index 7fa4cd61e2..853b024e27 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -1367,9 +1367,9 @@ final class DifferentialTransactionEditor foreach (array_chunk($sql, 256) as $chunk) { queryfx( $conn_w, - 'INSERT INTO %T (repositoryID, pathID, epoch, revisionID) VALUES %Q', + 'INSERT INTO %T (repositoryID, pathID, epoch, revisionID) VALUES %LQ', $table->getTableName(), - implode(', ', $chunk)); + $chunk); } } @@ -1444,9 +1444,9 @@ final class DifferentialTransactionEditor if ($sql) { queryfx( $conn_w, - 'INSERT INTO %T (revisionID, type, hash) VALUES %Q', + 'INSERT INTO %T (revisionID, type, hash) VALUES %LQ', ArcanistDifferentialRevisionHash::TABLE_NAME, - implode(', ', $sql)); + $sql); } }