From: Happy-melon Date: Sun, 13 Mar 2011 17:02:50 +0000 (+0000) Subject: Follow-up r83825: fix fatal in API X-Git-Tag: 1.31.0-rc.0~31462 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=04aad77ea10efd008aed751079e4b902d759e17c;p=lhc%2Fweb%2Fwiklou.git Follow-up r83825: fix fatal in API --- diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index a7197320ca..ede2e1335d 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -102,7 +102,7 @@ class ApiBlock extends ApiBase { $res['user'] = $params['user']; $res['userID'] = $target instanceof User ? $target->getId() : 0; - $block = SpecialBlock::getBlockFromTargetAndType( $target, $type ); + $block = Block::newFromTargetAndType( $target, $type ); if( $block instanceof Block ){ $res['expiry'] = $block->mExpiry == Block::infinity() ? 'infinite'