From: Sergio Santoro Date: Wed, 9 Jul 2014 21:29:41 +0000 (+0200) Subject: thumb.php: Fix undefined variable $width X-Git-Tag: 1.31.0-rc.0~15005^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=2e741ad641bf59886bf10716cdb2bbde756e34b8;p=lhc%2Fweb%2Fwiklou.git 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 --- 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'];