Taueres has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/145136

Change subject: thumb.php: fix undefined variable $width
......................................................................

thumb.php: fix undefined variable $width

In thumb.php an undefined variable ($width) was used, triggering
fatal errors while processing requests that were passing thumbnail
width with px (pixel) suffix.

Change-Id: I2dc4f4d2979f8225d2a6211ec50cdc79438539a9
---
M thumb.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/145136/1

diff --git a/thumb.php b/thumb.php
index c0042c2..89cc834 100644
--- a/thumb.php
+++ b/thumb.php
@@ -118,7 +118,7 @@
        }
        if ( isset( $params['width'] ) && substr( $params['width'], -2 ) == 
'px' ) {
                // strip the px (pixel) suffix, if found
-               $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+               $params['width'] = substr( $params['width'], 0, -2 );
        }
        if ( isset( $params['p'] ) ) {
                $params['page'] = $params['p'];

-- 
To view, visit https://gerrit.wikimedia.org/r/145136
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dc4f4d2979f8225d2a6211ec50cdc79438539a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Taueres <santoro....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to