Adamw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/111742

Change subject: Accept anything callable as a callback, need not be a global 
function name.
......................................................................

Accept anything callable as a callback, need not be a global function name.

Change-Id: Ie8300015e90f3b552322d5d8defa5d085cc709f1
---
M includes/form.inc
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/drupal 
refs/changes/42/111742/1

diff --git a/includes/form.inc b/includes/form.inc
index 4e467ba..6c3dfce 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -753,7 +753,7 @@
 
   // We first check to see if there's a function named after the $form_id.
   // If there is, we simply pass the arguments on to it to get the form.
-  if (!function_exists($form_id)) {
+  if (!is_callable($form_id)) {
     // In cases where many form_ids need to share a central constructor 
function,
     // such as the node editing form, modules can implement hook_forms(). It
     // maps one or more form_ids to the correct constructor functions.

-- 
To view, visit https://gerrit.wikimedia.org/r/111742
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8300015e90f3b552322d5d8defa5d085cc709f1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/drupal
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to