r111240 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111239‎ | r111240 | r111241 >
Date:15:14, 11 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Drag in a change noticed in wmf branches
Modified paths:
  • /trunk/phase3/thumb.php (modified) (history)

Diff [purge]

Index: trunk/phase3/thumb.php
@@ -124,7 +124,7 @@
125125
126126 // Check permissions if there are read restrictions
127127 if ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) {
128 - if ( !$img->getTitle()->userCan( 'read' ) ) {
 128+ if ( !$img->getTitle() || !$img->getTitle()->userCan( 'read' ) ) {
129129 wfThumbError( 403, 'Access denied. You do not have permission to access ' .
130130 'the source file.' );
131131 wfProfileOut( __METHOD__ );

Status & tagging log