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:
@@ -5,7 +5,7 @@ final class PhabricatorNotificationClearController
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$chrono_key = $request->getInt('chronoKey');
|
||||
$chrono_key = $request->getStr('chronoKey');
|
||||
$user = $request->getUser();
|
||||
|
||||
if ($request->isDialogFormPost()) {
|
||||
@@ -14,7 +14,7 @@ final class PhabricatorNotificationClearController
|
||||
queryfx(
|
||||
$table->establishConnection('w'),
|
||||
'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(),
|
||||
$user->getPHID(),
|
||||
$chrono_key);
|
||||
|
||||
Reference in New Issue
Block a user