X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FEditPage.php;h=6ae4371a104b5fc5a0fc24b5aeb9a60b92aa6c47;hb=f5360c82b810a05b35e8de3f983ecf2deea1961a;hp=f066a611a1c3ef94001f7675f1b12c82e197610a;hpb=174e8ccc6918d7db3a512976a9d74f96072e938b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index f066a611a1..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; } @@ -4166,7 +4169,7 @@ ERROR; * - 'legacy-name' (optional): short name for backwards-compatibility * @param array $checked Array of checkbox name (matching the 'legacy-name') => bool, * where bool indicates the checked status of the checkbox - * @return array + * @return array[] */ public function getCheckboxesDefinition( $checked ) { $checkboxes = [];