r83550 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83549‎ | r83550 | r83551 >
Date:23:07, 8 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix stupid fatal where wiki user isn't attached/doesn't exist
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -384,8 +384,13 @@
385385 // Get committer wiki user name, or repo name at least
386386 $commitAuthor = $this->getWikiUser();
387387
388 - $commitAuthorId = $commitAuthor->getId();
389 - $committer = $commitAuthor ? $commitAuthor->getName() : htmlspecialchars( $this->mAuthor );
 388+ if ( $commitAuthor ) {
 389+ $committer = $commitAuthor->getName();
 390+ $commitAuthorId = $commitAuthor->getId();
 391+ } else {
 392+ $committer = htmlspecialchars( $this->mAuthor );
 393+ $commitAuthorId = 0;
 394+ }
390395
391396 // Get the authors of these revisions
392397 $res = $dbw->select( 'code_rev',

Sign-offs

UserFlagDate
Krinkleinspected23:14, 8 March 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r83551MFT r83550reedy23:15, 8 March 2011
r83676Fix for r81071, still one $mAuthor left....demon23:01, 10 March 2011

Status & tagging log