X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FEditPage.php;h=6ae4371a104b5fc5a0fc24b5aeb9a60b92aa6c47;hb=e3e33ce99c909103b4b2b861c8361729441eccc8;hp=f066a611a1c3ef94001f7675f1b12c82e197610a;hpb=c081ae8e4de5075f5fec5b8f5f4c0734b7e9f05a;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 = [];