X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FEditPage.php;h=6ae4371a104b5fc5a0fc24b5aeb9a60b92aa6c47;hb=f5360c82b810a05b35e8de3f983ecf2deea1961a;hp=541541abbd202923ac2782d700991ec3fd5b48cb;hpb=72fa557f45ce6640bd13e82c7130ad7934d8c384;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index 541541abbd..6ae4371a10 100644 --- 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; }