aboutsummaryrefslogtreecommitdiffstats
path: root/thumb.php
diff options
context:
space:
mode:
Diffstat (limited to 'thumb.php')
-rw-r--r--thumb.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/thumb.php b/thumb.php
index 59bf8dcffdc8..d7bf45338241 100644
--- a/thumb.php
+++ b/thumb.php
@@ -116,6 +116,10 @@ function wfStreamThumb( array $params ) {
$params['width'] = $params['w'];
unset( $params['w'] );
}
+ if ( isset( $params['width'] ) && substr( $params['width'], -2 ) == 'px' ) {
+ // strip the px (pixel) suffix, if found
+ $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+ }
if ( isset( $params['p'] ) ) {
$params['page'] = $params['p'];
}