Per r23133, any function that is called by a hook and does not return a value will through a full stop error.
Since not returning anything in PHP is equivalent (more or less) to returning null, is there any concern that the extension writer's intent was to do so? Or is this simply a massive case of forgotten "return true" statements?
I totally agree that the the forgetting of return true is a big problem - I've done it myself. I'm just not fully convinced that throwing a full stop is the best answer. (I'd like to hear what others think on the matter).
-- Jim R. Wilson (jimbojw)
On 6/20/07, Voice of All jschulz_4587@msn.com wrote:
After I found the cause of a specific extension interaction bug, brion pointed out that this was a common error in extensions, that is functions attached to hooks that do not return a value. Such functions previously stopped all other functions attached to the hook from running - hence the interaction issues.
Per r23133, any function that is called by a hook and does not return a value will through a full stop error. This should encourage new extension writers to use cleaner functions that avoid this, however, I noticed a lot extension functions didn't return anything. I grepped through and tried to fix them all, at least the ones on SVN, but someone else may want to doublecheck, especially for the ones one WikiMedia sites (mainly http://en.wikipedia.org/wiki/Special:Version). -- View this message in context: http://www.nabble.com/Hooked-function-return-values-tf3955943.html#a11224995 Sent from the Wikipedia Developers mailing list archive at Nabble.com.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l