From: Roan Kattouw Date: Sat, 25 Oct 2008 22:22:22 +0000 (+0000) Subject: API: (bug 16115) API action=block dies with an exception when $wgBlockAllowsUTEdit... X-Git-Tag: 1.31.0-rc.0~44587 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=e7c507a57aa150ebf14ad9454dbcf1d3f4fee43e;p=lhc%2Fweb%2Fwiklou.git API: (bug 16115) API action=block dies with an exception when $wgBlockAllowsUTEdit is not a boolean (e.g. set to 1). While this shouldn't be done, of course, we can at least handle it more gracefully. --- diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index a760002de8..9cdf8ea10d 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -127,7 +127,7 @@ class ApiBlock extends ApiBase { 'autoblock' => false, 'noemail' => false, 'hidename' => false, - 'allowusertalk' => $wgBlockAllowsUTEdit, + 'allowusertalk' => (bool)$wgBlockAllowsUTEdit, ); }