From 4d3cc7b28dd19ec64b26344466a5fe0f5151f626 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 4 Sep 2014 12:47:51 -0700 Subject: [PATCH] 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 --- .../controller/PhabricatorNotificationClearController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/notification/controller/PhabricatorNotificationClearController.php b/src/applications/notification/controller/PhabricatorNotificationClearController.php index b0caa8b29e..94ee8aa0f3 100644 --- a/src/applications/notification/controller/PhabricatorNotificationClearController.php +++ b/src/applications/notification/controller/PhabricatorNotificationClearController.php @@ -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);