diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-24 21:07:32 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-24 21:07:32 +0100 |
| commit | 77360a574d13514289185c6810c53cc3acdc206e (patch) | |
| tree | 6666c97b95f6497f49504cf2f30df78e5e7970ec /image_order.php | |
| parent | 67587e23f293dc5fa3242a6e221eeaeff624297c (diff) | |
| download | fisheye-77360a574d13514289185c6810c53cc3acdc206e.tar.gz fisheye-77360a574d13514289185c6810c53cc3acdc206e.tar.bz2 fisheye-77360a574d13514289185c6810c53cc3acdc206e.zip | |
Guard updatePosition() call against non-Fisheye gallery items
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 <noreply@anthropic.com>
Diffstat (limited to 'image_order.php')
| -rwxr-xr-x | image_order.php | 4 |
1 files changed, 3 insertions, 1 deletions
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 ); |
