diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-21 09:01:13 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-21 09:01:13 +0100 |
| commit | e65ef31360e434b5993c7e81d5557383a83f4466 (patch) | |
| tree | 1c1ca6cb8183352e5e83fe110e9fb6877ccc8f07 /view.php | |
| parent | 2f96b54060b5059f701b684037ba995384dad385 (diff) | |
| download | fisheye-e65ef31360e434b5993c7e81d5557383a83f4466.tar.gz fisheye-e65ef31360e434b5993c7e81d5557383a83f4466.tar.bz2 fisheye-e65ef31360e434b5993c7e81d5557383a83f4466.zip | |
Show proper 404 error for invalid gallery ID instead of blank page
Diffstat (limited to 'view.php')
| -rwxr-xr-x | view.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; } |
