1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

Use %s, not %d, to encode a 64-bit integer for a query

Summary: Fixes T5982. Probably. I'm just guessing here but like 95% sure this will fix it and 99% sure it won't hurt/break anything.

Test Plan: Still works on my 64-bit install, for what little that's worth.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5982

Differential Revision: https://secure.phabricator.com/D10415
This commit is contained in:
epriestley 2014-09-04 12:47:51 -07:00
parent aaa08edb12
commit 4d3cc7b28d

View file

@ -5,7 +5,7 @@ final class PhabricatorNotificationClearController
public function processRequest() { public function processRequest() {
$request = $this->getRequest(); $request = $this->getRequest();
$chrono_key = $request->getInt('chronoKey'); $chrono_key = $request->getStr('chronoKey');
$user = $request->getUser(); $user = $request->getUser();
if ($request->isDialogFormPost()) { if ($request->isDialogFormPost()) {
@ -14,7 +14,7 @@ final class PhabricatorNotificationClearController
queryfx( queryfx(
$table->establishConnection('w'), $table->establishConnection('w'),
'UPDATE %T SET hasViewed = 1 '. 'UPDATE %T SET hasViewed = 1 '.
'WHERE userPHID = %s AND hasViewed = 0 and chronologicalKey <= %d', 'WHERE userPHID = %s AND hasViewed = 0 and chronologicalKey <= %s',
$table->getTableName(), $table->getTableName(),
$user->getPHID(), $user->getPHID(),
$chrono_key); $chrono_key);