Last modified: 2008-09-28 04:05:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17751, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15751 - wasDeletedSinceLastEdit() fails on databases with real timestamps
wasDeletedSinceLastEdit() fails on databases with real timestamps
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.14.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-28 02:10 UTC by Brad Jorsch
Modified: 2008-09-28 04:05 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to fix the bug (509 bytes, patch)
2008-09-28 02:10 UTC, Brad Jorsch
Details

Description Brad Jorsch 2008-09-28 02:10:02 UTC
Created attachment 5367 [details]
Patch to fix the bug

On databases with real timestamps (e.g. Postgresql), wasDeletedSinceLastEdit() in includes/EditPage.php fails to detect that the page was deleted since the last edit. This is due to it retrieving something resembling "2008-09-28 01:10:48+00" from the database in getLastDelete() and then trying to subtract from it as if it were an integer. PHP converts that timestamp to the number 2008, which is going to be before any $starttime in the last 2000 years or so, and thus the check always fails.

The attached patch seems to fix it.

This is using php 5.2.6, postgresql 8.3.4, and MediaWiki r41327.
Comment 1 Aaron Schulz 2008-09-28 04:05:10 UTC
Fixed in r41335

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links