dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3dc89e
)
Slightly more informative error message when passed a bogus key (rather than property...
author
Chad Horohoe
<demon@users.mediawiki.org>
Fri, 15 Jul 2011 16:59:38 +0000
(16:59 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Fri, 15 Jul 2011 16:59:38 +0000
(16:59 +0000)
includes/upload/UploadStash.php
patch
|
blob
|
history
diff --git
a/includes/upload/UploadStash.php
b/includes/upload/UploadStash.php
index
75e0b2b
..
6b6dfff
100644
(file)
--- a/
includes/upload/UploadStash.php
+++ b/
includes/upload/UploadStash.php
@@
-353,6
+353,10
@@
class UploadStash {
__METHOD__
);
__METHOD__
);
+ if( !$row ) {
+ throw new UploadStashNoSuchKeyException( "No such key ($key), cannot remove" );
+ }
+
if ( $row->us_user != $this->userId ) {
throw new UploadStashWrongOwnerException( "Can't delete: the file ($key) doesn't belong to this user." );
}
if ( $row->us_user != $this->userId ) {
throw new UploadStashWrongOwnerException( "Can't delete: the file ($key) doesn't belong to this user." );
}
@@
-690,3
+694,4
@@
class UploadStashZeroLengthFileException extends MWException {};
class UploadStashNotLoggedInException extends MWException {};
class UploadStashWrongOwnerException extends MWException {};
class UploadStashMaxLagExceededException extends MWException {};
class UploadStashNotLoggedInException extends MWException {};
class UploadStashWrongOwnerException extends MWException {};
class UploadStashMaxLagExceededException extends MWException {};
+class UploadStashNoSuchKeyException extends MWException {};