summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-21 09:01:13 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-21 09:01:13 +0100
commite65ef31360e434b5993c7e81d5557383a83f4466 (patch)
tree1c1ca6cb8183352e5e83fe110e9fb6877ccc8f07
parent2f96b54060b5059f701b684037ba995384dad385 (diff)
downloadfisheye-e65ef31360e434b5993c7e81d5557383a83f4466.tar.gz
fisheye-e65ef31360e434b5993c7e81d5557383a83f4466.tar.bz2
fisheye-e65ef31360e434b5993c7e81d5557383a83f4466.zip
Show proper 404 error for invalid gallery ID instead of blank page
-rwxr-xr-xview.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/view.php b/view.php
index 48597b7..6f7180a 100755
--- a/view.php
+++ b/view.php
@@ -6,6 +6,7 @@
*/
use Bitweaver\KernelTools;
+use Bitweaver\HttpStatusCodes;
/**
* required setup
@@ -26,8 +27,11 @@ global $gHideModules;
$gHideModules = $gBitSystem->isFeatureActive( 'fisheye_gallery_hide_modules' );
if ( !$gContent->isValid() ) {
+ if ( !empty( $_REQUEST['gallery_id'] ) ) {
+ $gBitSystem->fatalError( KernelTools::tra('No gallery exists with the given ID'), null, null, HttpStatusCodes::HTTP_NOT_FOUND );
+ }
// No gallery was indicated so we will redirect to the browse galleries page
- KernelTools::bit_redirect( FISHEYE_PKG_URL."list_galleries.php", '404' );
+ KernelTools::bit_redirect( FISHEYE_PKG_URL."list_galleries.php", HttpStatusCodes::HTTP_FOUND );
die;
}