X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FEditPage.php;h=6ae4371a104b5fc5a0fc24b5aeb9a60b92aa6c47;hb=e3e33ce99c909103b4b2b861c8361729441eccc8;hp=e51fc52bd763efe2142fb9609eb5eb0c40087e50;hpb=28120473f534966ec5e79b515cb8be21855b6e10;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index e51fc52bd7..6ae4371a10 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1127,7 +1127,7 @@ class EditPage { * @return string|null */ protected function importContentFormData( &$request ) { - return; // Don't do anything, EditPage already extracted wpTextbox1 + return null; // Don't do anything, EditPage already extracted wpTextbox1 } /** @@ -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 = [];