Skip to content

Instantly share code, notes, and snippets.

@tarekdj
Last active November 15, 2016 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarekdj/d924005620d4b942f4e3bc1fe8e28c2b to your computer and use it in GitHub Desktop.
Save tarekdj/d924005620d4b942f4e3bc1fe8e28c2b to your computer and use it in GitHub Desktop.
Issue #2563761: Call to undefined function bootstrap_form_process()
<?php
/**
* Implements hook_init().
*/
function MY_MODULE_init() {
module_invoke('bootstrap', 'element_info');
module_invoke('bootstrap', 'element_info_alter');
}
diff --git a/includes/alter.inc b/includes/alter.inc
index c4a9677..60e18cf 100644
--- a/includes/alter.inc
+++ b/includes/alter.inc
@@ -76,7 +76,7 @@ function bootstrap_css_alter(&$css) {
/**
* Implements hook_element_info_alter().
*/
-function bootstrap_element_info_alter(&$info) {
+function bootstrap_element_info_alter(&$info = array()) {
global $theme_key;
$cid = "theme_registry:bootstrap:element_info";
* Creat a custom module & implement hook_init (See module example)
* Patch bootstrap theme using the patch.diff
@markhalliwell
Copy link

bootstrap isn't a module, so module_invoke('bootstrap', 'element_info') doesn't actually do anything.

And module_invoke('bootstrap', 'element_info_alter') is wrong, it should be drupal_alter('element_info') which is called for both modules and themes in 7.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment