summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-06 20:00:41 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-06 20:00:41 +0100
commitc39bae2d02294e06274199fa8a06b47aeb26f715 (patch)
tree0bfe910737d8a6df16413d2ecf687d1959e95736
parentb0deca1abeba1eb0e7d3374ef44c44e1adfefde8 (diff)
downloadwiki-c39bae2d02294e06274199fa8a06b47aeb26f715.tar.gz
wiki-c39bae2d02294e06274199fa8a06b47aeb26f715.tar.bz2
wiki-c39bae2d02294e06274199fa8a06b47aeb26f715.zip
wiki: fix TypeError in backlinks.php when no page is specified
The empty if block at line 23 was never filled in. With no page/page_id/ content_id in the request, lookup_page_inc.php produces a blank BitPage with mPageName=null. Passing null to pageExists(string) throws a TypeError in PHP 8.1+. Add a fatalError() in the empty block so missing-page requests are handled before the pageExists() call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rwxr-xr-xbacklinks.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/backlinks.php b/backlinks.php
index 864c75f..c358eec 100755
--- a/backlinks.php
+++ b/backlinks.php
@@ -21,6 +21,7 @@ $gBitSystem->verifyFeature( 'wiki_backlinks' );
// Get the page from the request var or default it to HomePage
if ( empty($gContent->mPageName) ) {
+ $gBitSystem->fatalError( KernelTools::tra( "No page specified" ) );
}
// Now check permissions to access this page
$gContent->verifyViewPermission();