Followup cf5f641: pass $params by reference again
authorRoan Kattouw <roan.kattouw@gmail.com>
Mon, 15 Dec 2014 15:34:21 +0000 (16:34 +0100)
committerGiuseppe Lavagetto <glavagetto@wikimedia.org>
Mon, 15 Dec 2014 16:07:55 +0000 (16:07 +0000)
&$params was changed to $params, but hooks.txt still documents
this parameter as being passed by reference, and VipsScaler expects this.

Giuseppe and I suspect this may be what's causing the HHVM segfaults
we're seeing in beta labs.

Change-Id: Ib018f23bc44c247aefc277a0c75ff8577f309ab4

includes/media/TransformationalImageHandler.php

index 51cd28d..fd8d81d 100644 (file)
@@ -589,14 +589,14 @@ abstract class TransformationalImageHandler extends ImageHandler {
         * @return bool
         * @since 1.25
         */
-       public function isImageAreaOkForThumbnaling( $file, $params ) {
+       public function isImageAreaOkForThumbnaling( $file, &$params ) {
                global $wgMaxImageArea;
 
                # For historical reasons, hook starts with BitmapHandler
                $checkImageAreaHookResult = null;
                Hooks::run(
                        'BitmapHandlerCheckImageArea',
-                       array( $file, $params, &$checkImageAreaHookResult )
+                       array( $file, &$params, &$checkImageAreaHookResult )
                );
 
                if ( !is_null( $checkImageAreaHookResult ) ) {