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