Last modified: 2012-08-04 20:48:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 15833 - Special:CheckUser causes errors with PostgreSQL
Special:CheckUser causes errors with PostgreSQL
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CheckUser (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Aaron Schulz
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2008-10-04 20:29 UTC by Brad Jorsch
Modified: 2012-08-04 20:48 UTC (History)
0 users

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


Attachments
Patch for the three remaining errors in r41668 (1.40 KB, patch)
2008-10-04 22:25 UTC, Brad Jorsch
Details

Description Brad Jorsch 2008-10-04 20:29:29 UTC
Using Special:CheckUser's "Account Edits" or "Get edits from IP" options with a database that uses real timestamps (e.g. PostgreSQL) causes a number of errors similar to the following to be output:

Notice: Undefined offset: -2 in /usr/local/src/MediaWiki/phase3/languages/Language.php on line 423

Notice: Undefined offset: -1 in /usr/local/src/MediaWiki/phase3/languages/Language.php on line 423

Language::sprintfDate and Language::timeanddate both expect a YYYYMMDDHHMMSS format timestamp, but CheckUser_body.php is passing it whatever is returned from the database. One possible fix is to run any timestamps retrieved from the database through wfTimestamp() (with the TS_MW option) before passing them to these functions.


Also, using any of the Duration options besides "all" causes a database error, as PostgreSQL does not recognize the "YYYYMMDDHHMMSS" format as a valid input format for timestamps. The fix here seems to be to use the $dbr->timestamp() method to convert the timestamp into the appropriate format for the database before using it in the SQL query.


All of this was tested using a local installation of MediaWiki r41664, the CheckUser extension as of r41664, and PostgreSQL 8.3.4.
Comment 1 Aaron Schulz 2008-10-04 22:09:00 UTC
Fixed in r41668
Comment 2 Brad Jorsch 2008-10-04 22:25:29 UTC
Created attachment 5388 [details]
Patch for the three remaining errors in r41668

Three timestamps were missed in r41668. This patch fixes them in the same style as r41668.
Comment 3 Aaron Schulz 2008-10-04 22:38:12 UTC
Rest done in r41670

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


Navigation
Links