@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Correct two straggling "%Q" + "implode(...)" callsites in Revision updates

Summary:
See <https://discourse.phabricator-community.org/t/error-seems-to-be-related-with-da40f8074-and-php-7-3/2102/12>. 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

+4 -4
+4 -4
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 1367 1367 foreach (array_chunk($sql, 256) as $chunk) { 1368 1368 queryfx( 1369 1369 $conn_w, 1370 - 'INSERT INTO %T (repositoryID, pathID, epoch, revisionID) VALUES %Q', 1370 + 'INSERT INTO %T (repositoryID, pathID, epoch, revisionID) VALUES %LQ', 1371 1371 $table->getTableName(), 1372 - implode(', ', $chunk)); 1372 + $chunk); 1373 1373 } 1374 1374 } 1375 1375 ··· 1444 1444 if ($sql) { 1445 1445 queryfx( 1446 1446 $conn_w, 1447 - 'INSERT INTO %T (revisionID, type, hash) VALUES %Q', 1447 + 'INSERT INTO %T (revisionID, type, hash) VALUES %LQ', 1448 1448 ArcanistDifferentialRevisionHash::TABLE_NAME, 1449 - implode(', ', $sql)); 1449 + $sql); 1450 1450 } 1451 1451 } 1452 1452