Index: branches/REL1_14/phase3/includes/api/ApiProtect.php |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | $errors = $titleObj->getUserPermissionsErrors('protect', $wgUser); |
61 | 61 | if($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 | $expiry = (array)$params['expiry']; |
66 | 66 | if(count($expiry) != count($params['protections'])) |
Index: branches/REL1_14/phase3/includes/api/ApiRollback.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | |
70 | 70 | if($retval) |
71 | 71 | // We don't care about multiple errors, just report one of them |
72 | | - $this->dieUsageMsg(current($retval)); |
| 72 | + $this->dieUsageMsg(reset($retval)); |
73 | 73 | |
74 | 74 | $info = array( |
75 | 75 | 'title' => $titleObj->getPrefixedText(), |
Index: branches/REL1_14/phase3/includes/api/ApiDelete.php |
— | — | @@ -76,14 +76,14 @@ |
77 | 77 | $retval = self::deleteFile($params['token'], $titleObj, $params['oldimage'], $reason, false); |
78 | 78 | if(count($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 | } else { |
82 | 82 | $articleObj = new Article($titleObj); |
83 | 83 | $retval = self::delete($articleObj, $params['token'], $reason); |
84 | 84 | |
85 | 85 | if(count($retval)) |
86 | 86 | // We don't care about multiple errors, just report one of them |
87 | | - $this->dieUsageMsg(current($retval)); |
| 87 | + $this->dieUsageMsg(reset($retval)); |
88 | 88 | |
89 | 89 | if($params['watch'] || $wgUser->getOption('watchdeletion')) |
90 | 90 | $articleObj->doWatch(); |
Index: branches/REL1_14/phase3/includes/api/ApiPatrol.php |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | $retval = RecentChange::markPatrolled($params['rcid']); |
60 | 60 | |
61 | 61 | if($retval) |
62 | | - $this->dieUsageMsg(current($retval)); |
| 62 | + $this->dieUsageMsg(reset($retval)); |
63 | 63 | |
64 | 64 | $result = array('rcid' => $rc->getAttribute('rc_id')); |
65 | 65 | ApiQueryBase::addTitleInfo($result, $rc->getTitle()); |