X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiUpload.php;h=93e432b9512900a895140eb910b48e97a662d453;hb=f2b621be73632b17d7e647b10959a0ed7dae9284;hp=cfe19689382506433cb419808bf23efdb91b714f;hpb=a17d459d4bfa29f56181f0be1e407336574d9361;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index cfe1968938..93e432b951 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -1,9 +1,5 @@ * * This program is free software; you can redistribute it and/or modify @@ -728,26 +724,26 @@ class ApiUpload extends ApiBase { */ protected function handleStashException( $e ) { switch ( get_class( $e ) ) { - case 'UploadStashFileNotFoundException': + case UploadStashFileNotFoundException::class: $wrap = 'apierror-stashedfilenotfound'; break; - case 'UploadStashBadPathException': + case UploadStashBadPathException::class: $wrap = 'apierror-stashpathinvalid'; break; - case 'UploadStashFileException': + case UploadStashFileException::class: $wrap = 'apierror-stashfilestorage'; break; - case 'UploadStashZeroLengthFileException': + case UploadStashZeroLengthFileException::class: $wrap = 'apierror-stashzerolength'; break; - case 'UploadStashNotLoggedInException': + case UploadStashNotLoggedInException::class: return StatusValue::newFatal( ApiMessage::create( [ 'apierror-mustbeloggedin', $this->msg( 'action-upload' ) ], 'stashnotloggedin' ) ); - case 'UploadStashWrongOwnerException': + case UploadStashWrongOwnerException::class: $wrap = 'apierror-stashwrongowner'; break; - case 'UploadStashNoSuchKeyException': + case UploadStashNoSuchKeyException::class: $wrap = 'apierror-stashnosuchfilekey'; break; default: