Index: trunk/phase3/includes/upload/UploadStash.php |
— | — | @@ -353,6 +353,10 @@ |
354 | 354 | __METHOD__ |
355 | 355 | ); |
356 | 356 | |
| 357 | + if( !$row ) { |
| 358 | + throw new UploadStashNoSuchKeyException( "No such key ($key), cannot remove" ); |
| 359 | + } |
| 360 | + |
357 | 361 | if ( $row->us_user != $this->userId ) { |
358 | 362 | throw new UploadStashWrongOwnerException( "Can't delete: the file ($key) doesn't belong to this user." ); |
359 | 363 | } |
— | — | @@ -690,3 +694,4 @@ |
691 | 695 | class UploadStashNotLoggedInException extends MWException {}; |
692 | 696 | class UploadStashWrongOwnerException extends MWException {}; |
693 | 697 | class UploadStashMaxLagExceededException extends MWException {}; |
| 698 | +class UploadStashNoSuchKeyException extends MWException {}; |