From c39bae2d02294e06274199fa8a06b47aeb26f715 Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Sat, 6 Jun 2026 20:00:41 +0100 Subject: 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 --- backlinks.php | 1 + 1 file changed, 1 insertion(+) 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(); -- cgit v1.3