Page MenuHomePhabricator

mw 1.25+ supports booleans as parameter assignment
Open, LowPublic

Description

Currently api._encoded_items() encodes boolean items of True to the empty list [''] which leads to "&apiparam=" in _http_param_string. This should be replaced to "&apiparam=True" for newer mw versions.

Event Timeline

I've not tested, but I think mediawiki interprets &apiparam=False as a true value, i.e. passing the parameter means true and it must be omitted for false.
If so, then I personally find &apiparam=True a little misleading and would prefer to continue using &apiparam= for true values. Others may disagree of-course.