r72785 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72784‎ | r72785 | r72786 >
Date:09:09, 11 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixed fatal error - now $user is being checked to be sucessfully built before it's used.
Modified paths:
  • /trunk/phase3/includes/ResourceLoaderModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ResourceLoaderModule.php
@@ -839,8 +839,7 @@
840840 if ( isset( $this->modifiedTime[$hash] ) ) {
841841 return $this->modifiedTime[$hash];
842842 }
843 - if ( $context->getUser() ) {
844 - $user = User::newFromName( $context->getUser() );
 843+ if ( $context->getUser() && $user = User::newFromName( $context->getUser() ) ) {
845844 return $this->modifiedTime[$hash] = $user->getTouched();
846845 } else {
847846 return 0;

Status & tagging log