From a513f46b80397a3f8fab697f57ec303b56deaa31 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Fri, 13 Dec 2013 01:54:20 -0700 Subject: [PATCH] Fix error handling in File::createThumb. Was checking for null, but transform always returns either false or an object. createThumb isn't used in core, but some extensions use it. Bug: 58436 Change-Id: Icaf5088a193dc1d9b9c365f92722bef1f9c1dba6 --- includes/filerepo/file/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 1c9d8aacf5..dc35016d1f 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -904,7 +904,7 @@ abstract class File { $params['height'] = $height; } $thumb = $this->transform( $params ); - if ( is_null( $thumb ) || $thumb->isError() ) { + if ( !$thumb || $thumb->isError() ) { return ''; } -- 2.20.1