Page MenuHomePhabricator

Incorrect update to wl_notificationtimestamp in WatchedItem.php
Closed, ResolvedPublic

Description

Inside WatchedItem.php,. at the end of resetNotificationTimestamp, there is a call to update a user's watchlist like so:

$dbw->update( 'watchlist', array( 'wl_notificationtimestamp' =>$notificationTimestamp ), $this->dbCond(), METHOD );

As $notificationTimestamp can be a raw string at this point, the call needs to be:

$dbw->update( 'watchlist', array( 'wl_notificationtimestamp' => $dbw->timestamp( $notificationTimestamp ) ), $this->dbCond(), METHOD );

Details

Related Gerrit Patches:

Event Timeline

Greg_Sabino_Mullane raised the priority of this task from to Needs Triage.
Greg_Sabino_Mullane updated the task description. (Show Details)
Krenair added a subscriber: Krenair.
Greg_Sabino_Mullane set Security to None.
Aklapper triaged this task as Low priority.Jan 15 2015, 8:29 PM

@Greg_Sabino_Mullane: Thanks for taking a look at the code!

You are very welcome to use developer access to submit this as a Git branch directly into Gerrit.

Putting your branch in Git makes it easier to review it quickly. If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader. Thanks again!

Change 254675 had a related patch set uploaded (by Umherirrender):
Call DB::timestampOrNull in WatchedItem::resetNotificationTimestamp

https://gerrit.wikimedia.org/r/254675

Change 254675 merged by jenkins-bot:
Call DB::timestampOrNull in WatchedItem::resetNotificationTimestamp

https://gerrit.wikimedia.org/r/254675

Umherirrender closed this task as Resolved.Nov 22 2015, 4:13 PM