Brian Wolff has uploaded a new change for review.
https://gerrit.wikimedia.org/r/101179
Change subject: Fix error handling in File::createThumb.
......................................................................
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
---
M includes/filerepo/file/File.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/79/101179/1
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 1c9d8aa..dc35016 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -904,7 +904,7 @@
$params['height'] = $height;
}
$thumb = $this->transform( $params );
- if ( is_null( $thumb ) || $thumb->isError() ) {
+ if ( !$thumb || $thumb->isError() ) {
return '';
}
--
To view, visit https://gerrit.wikimedia.org/r/101179
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaf5088a193dc1d9b9c365f92722bef1f9c1dba6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits