dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
d4e0dbc
)
Merge "EditPage: Don't set 'hookaborted' error if the hook set a better error"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Wed, 4 Sep 2019 15:27:44 +0000
(15:27 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Wed, 4 Sep 2019 15:27:44 +0000
(15:27 +0000)
includes/EditPage.php
patch
|
blob
|
history
diff --git
a/includes/EditPage.php
b/includes/EditPage.php
index
541541a
..
6ae4371
100644
(file)
--- a/
includes/EditPage.php
+++ b/
includes/EditPage.php
@@
-1799,8
+1799,11
@@
class EditPage {
} elseif ( !$status->isOK() ) {
# ...or the hook could be expecting us to produce an error
// FIXME this sucks, we should just use the Status object throughout
+ if ( !$status->getErrors() ) {
+ // Provide a fallback error message if none was set
+ $status->fatal( 'hookaborted' );
+ }
$this->hookError = $this->formatStatusErrors( $status );
- $status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR_EXPECTED;
return false;
}