From: Sam Reed Date: Sat, 11 Feb 2012 15:14:15 +0000 (+0000) Subject: Drag in a change noticed in wmf branches X-Git-Tag: 1.31.0-rc.0~24773 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=356799f95a8cc919b1a4d197d6b9e1041d849173;p=lhc%2Fweb%2Fwiklou.git Drag in a change noticed in wmf branches --- 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__ );