Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/275384
Change subject: Hooks do not have to return true any more, they can return null ...................................................................... Hooks do not have to return true any more, they can return null Via the argument given by Krinkle in https://gerrit.wikimedia.org/r/#/c/274751/1/ImageMap_body.php Quote: "[Returning true is] obsolete for a while and slowly disappearing from existing code. Only 'return false' is an explicit signal. The default is true. This was done because it very often is forgotten and causes broke in production in catastrophic ways on numerous occasions. This better reflects the mental model of intent and also makes it more natural when dealing with hooks such as these, which can't be aborted and as such don't have a sensible purpose in returning false, which means returning true can be confusing." Change-Id: I98308ed9105d904e47db3ac7899412f239c2bf9d --- M docs/hooks.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/84/275384/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index c5f2424..a535702 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -178,7 +178,7 @@ Hooks can return three possible values: - * true: the hook has operated successfully + * true (deprecated) or null: the hook has operated successfully * "some string": an error occurred; processing should stop and the error should be shown to the user * false: the hook has successfully done the work necessary and the calling -- To view, visit https://gerrit.wikimedia.org/r/275384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98308ed9105d904e47db3ac7899412f239c2bf9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
