From bddfe64fc9fbe1f410f5b8fe89bc373ab78e951c Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 12 Sep 2008 02:45:36 +0000 Subject: [PATCH] Update docs to caution against use of create_function(). Per bug 15476. --- docs/hooks.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/hooks.txt b/docs/hooks.txt index 9e9dbf9ee7..440b251395 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -198,6 +198,10 @@ system (LDAP, another PHP program, whatever), you could do: Returning false makes less sense for events where the action is complete, and will normally be ignored. +Note that none of the examples made use of create_function() as a way to +attach a function to a hook. This is known to cause problems (notably with +Special:Version), and should be avoided when at all possible. + ==Using hooks== A calling function or method uses the wfRunHooks() function to run the hooks -- 2.20.1