From 2e741ad641bf59886bf10716cdb2bbde756e34b8 Mon Sep 17 00:00:00 2001 From: Sergio Santoro Date: Wed, 9 Jul 2014 23:29:41 +0200 Subject: [PATCH] thumb.php: Fix undefined variable $width Follows-up 5ca94d2d26e80bb2a4ea9339a3adc31baf186d3a. 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 --- thumb.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thumb.php b/thumb.php index c0042c2c95..89cc834355 100644 --- a/thumb.php +++ b/thumb.php @@ -118,7 +118,7 @@ function wfStreamThumb( array $params ) { } 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']; -- 2.20.1