From 77360a574d13514289185c6810c53cc3acdc206e Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Sun, 24 May 2026 21:07:32 +0100 Subject: Guard updatePosition() call against non-Fisheye gallery items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wiki pages embedded in galleries don't extend FisheyeBase so lack updatePosition() — method_exists() check prevents fatal error on reorder. Co-Authored-By: Claude Sonnet 4.6 --- image_order.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/image_order.php b/image_order.php index 8e4a12e..3295a15 100755 --- a/image_order.php +++ b/image_order.php @@ -178,7 +178,9 @@ if (!empty($_REQUEST['cancel'])) { if( !empty( $storageHash ) ) { $galleryItem->store($storageHash); } - $galleryItem->updatePosition($gContent->mContentId, $newPos); + if( method_exists( $galleryItem, 'updatePosition' ) ) { + $galleryItem->updatePosition($gContent->mContentId, $newPos); + } } } unset( $storageHash ); -- cgit v1.3