X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiContinuationManager.php;h=e4c52dd3812bef66b58c663d80ee9e2972166340;hb=8699880aab6f666f902b8d8927325760adfe7c20;hp=19e2453944b132a695a80400b4e525d65d3dfc0d;hpb=12313956c58e88b98d4baf722464e09b4a351bf3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiContinuationManager.php b/includes/api/ApiContinuationManager.php index 19e2453944..e4c52dd381 100644 --- a/includes/api/ApiContinuationManager.php +++ b/includes/api/ApiContinuationManager.php @@ -40,7 +40,7 @@ class ApiContinuationManager { * @param ApiBase $module Module starting the continuation * @param ApiBase[] $allModules Contains ApiBase instances that will be executed * @param array $generatedModules Names of modules that depend on the generator - * @throws UsageException + * @throws ApiUsageException */ public function __construct( ApiBase $module, array $allModules = [], array $generatedModules = [] @@ -57,10 +57,7 @@ class ApiContinuationManager { if ( $continue !== '' ) { $continue = explode( '||', $continue ); if ( count( $continue ) !== 2 ) { - throw new UsageException( - 'Invalid continue param. You should pass the original value returned by the previous query', - 'badcontinue' - ); + throw ApiUsageException::newWithMessage( $module->getMain(), 'apierror-badcontinue' ); } $this->generatorDone = ( $continue[0] === '-' ); $skip = explode( '|', $continue[1] ); @@ -220,6 +217,8 @@ class ApiContinuationManager { // Some modules are unfinished: include those params, and copy // the generator params. foreach ( $continuationData as $module => $kvp ) { + // XXX: Not sure why phan is complaining here... + // @phan-suppress-next-line PhanTypeInvalidLeftOperand $data += $kvp; } $generatorParams = [];