From e7c507a57aa150ebf14ad9454dbcf1d3f4fee43e Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 25 Oct 2008 22:22:22 +0000 Subject: [PATCH] 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. --- includes/api/ApiBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, ); } -- 2.20.1