Author: Bryan.TongMinh
Description:
I get the following error when accessing the API on my local MediaWiki: "API must be accessed through the primary script entry point." even when the API is accessed through its primary script entry point, but only when a query string is appended.
From line 57:
$wgScriptPath/api$wgScriptExtension: /local/w-dev/api.php
$url: /local/w-dev/api.php?action=query&list=categorymembers&cmtitle=Category:Living_people
$strcmp( "$wgScriptPath/api$wgScriptExtension", $url ): -65
PHP Version 5.2.5 is running as FastCGI.
I wonder why strcmp is used as comparison. According to the PHP docs strcmp will only return 0 if the strings are equal, in which case === can be used.
Version: 1.12.x
Severity: normal