Index: branches/REL1_13/phase3/includes/api/ApiProtect.php |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | $errors = $titleObj->getUserPermissionsErrors('protect', $wgUser); |
61 | 61 | if(!empty($errors)) |
62 | 62 | // We don't care about multiple errors, just report one of them |
63 | | - $this->dieUsageMsg(current($errors)); |
| 63 | + $this->dieUsageMsg(reset($errors)); |
64 | 64 | |
65 | 65 | if(in_array($params['expiry'], array('infinite', 'indefinite', 'never'))) |
66 | 66 | $expiry = Block::infinity(); |
Index: branches/REL1_13/phase3/includes/api/ApiRollback.php |
— | — | @@ -66,7 +66,7 @@ |
67 | 67 | |
68 | 68 | if(!empty($retval)) |
69 | 69 | // We don't care about multiple errors, just report one of them |
70 | | - $this->dieUsageMsg(current($retval)); |
| 70 | + $this->dieUsageMsg(reset($retval)); |
71 | 71 | |
72 | 72 | $current = $target = $summary = NULL; |
73 | 73 | extract($details); |
Index: branches/REL1_13/phase3/includes/api/ApiDelete.php |
— | — | @@ -69,14 +69,14 @@ |
70 | 70 | $retval = self::deletefile($params['token'], $titleObj, $params['oldimage'], $reason, false); |
71 | 71 | if(!empty($retval)) |
72 | 72 | // We don't care about multiple errors, just report one of them |
73 | | - $this->dieUsageMsg(current($retval)); |
| 73 | + $this->dieUsageMsg(reset($retval)); |
74 | 74 | } else { |
75 | 75 | $articleObj = new Article($titleObj); |
76 | 76 | $retval = self::delete($articleObj, $params['token'], $reason); |
77 | 77 | |
78 | 78 | if(!empty($retval)) |
79 | 79 | // We don't care about multiple errors, just report one of them |
80 | | - $this->dieUsageMsg(current($retval)); |
| 80 | + $this->dieUsageMsg(reset($retval)); |
81 | 81 | |
82 | 82 | if($params['watch'] || $wgUser->getOption('watchdeletion')) |
83 | 83 | $articleObj->doWatch(); |