includes/api/ApiErrorFormatter.php 1 location
|
@@ 252-261 (lines=10) @@
|
249 |
|
} |
250 |
|
|
251 |
|
$result = []; |
252 |
|
foreach ( $status->getErrorsByType( $type ) as $error ) { |
253 |
|
if ( $error['message'] instanceof Message ) { |
254 |
|
$error = [ |
255 |
|
'message' => $error['message']->getKey(), |
256 |
|
'params' => $error['message']->getParams(), |
257 |
|
] + $error; |
258 |
|
} |
259 |
|
ApiResult::setIndexedTagName( $error['params'], 'param' ); |
260 |
|
$result[] = $error; |
261 |
|
} |
262 |
|
ApiResult::setIndexedTagName( $result, $type ); |
263 |
|
|
264 |
|
return $result; |
includes/api/ApiParamInfo.php 1 location
|
@@ 217-227 (lines=11) @@
|
214 |
|
|
215 |
|
case 'raw': |
216 |
|
$res[$key] = []; |
217 |
|
foreach ( $msgs as $m ) { |
218 |
|
$a = [ |
219 |
|
'key' => $m->getKey(), |
220 |
|
'params' => $m->getParams(), |
221 |
|
]; |
222 |
|
ApiResult::setIndexedTagName( $a['params'], 'param' ); |
223 |
|
if ( $m instanceof ApiHelpParamValueMessage ) { |
224 |
|
$a['forvalue'] = $m->getParamValue(); |
225 |
|
} |
226 |
|
$res[$key][] = $a; |
227 |
|
} |
228 |
|
ApiResult::setIndexedTagName( $res[$key], 'msg' ); |
229 |
|
break; |
230 |
|
} |