A GET request for https://en.wikipedia.org/w/api.php?action=templatedata&format=json&titles=Template%3AWikiProject%20India&redirects=1&doNotIgnoreMissingTitles=1 returns status 500. Loading the url in the browser shows a WMF error page with the following message:
PHP fatal error:
Argument 1 passed to ApiResult::setIndexedTagName() must be an instance of array, null given
Similar requests such as
- https://en.wikipedia.org/w/api.php?action=templatedata&format=json&titles=Template%3AWikiProject%20Australia&redirects=1&doNotIgnoreMissingTitles=1
- https://en.wikipedia.org/w/api.php?action=templatedata&format=json&titles=Template%3AWikiProject%20New%20Zealand&redirects=1&doNotIgnoreMissingTitles=1
work as expected, returning the result of the request.
The request is being made from my enwiki userscript User:Evad37/rater; I found this error while investigating an issue reported by another user.