break;
case UploadBase::HOOK_ABORTED:
- $this->dieWithError( $params, 'hookaborted', [ 'details' => $verification['error'] ] );
+ $msg = $verification['error'] === '' ? 'hookaborted' : $verification['error'];
+ $this->dieWithError( $msg, 'hookaborted', [ 'details' => $verification['error'] ] );
break;
default:
$this->dieWithError( 'apierror-unknownerror-nocode', 'unknown-error',
* @return StatusValue
*/
protected function handleStashException( $e ) {
- switch ( get_class( $exception ) ) {
+ switch ( get_class( $e ) ) {
case 'UploadStashFileNotFoundException':
$wrap = 'apierror-stashedfilenotfound';
break;