From 356799f95a8cc919b1a4d197d6b9e1041d849173 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 11 Feb 2012 15:14:15 +0000 Subject: [PATCH] Drag in a change noticed in wmf branches --- thumb.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thumb.php b/thumb.php index 60a7ffb68b..eb0d67df19 100644 --- a/thumb.php +++ b/thumb.php @@ -124,7 +124,7 @@ function wfStreamThumb( array $params ) { // Check permissions if there are read restrictions if ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) { - if ( !$img->getTitle()->userCan( 'read' ) ) { + if ( !$img->getTitle() || !$img->getTitle()->userCan( 'read' ) ) { wfThumbError( 403, 'Access denied. You do not have permission to access ' . 'the source file.' ); wfProfileOut( __METHOD__ ); -- 2.20.1