PHP Fatal error: Function name must be a string in /data/webroot/sites/domino/www/profiles/domino_profile/modules/contrib/menu_minipanels/menu_minipanels.module on line 310
The problem here is that Theme Developer (http://drupal.org/project/devel_themer) has its own hook_theme_registry_alter() that moves ['link']['function'] to ['link']['original']['function'].
I'm not too familiar with how this part of the hook system works. I've worked around by changing
return $registry['link']['old function']($link);
to
if (isset($registry['link']['old function'])) {
return $registry['link']['old function']($link);
}
elseif (isset($registry['link']['original']['old function'])) {
return $registry['link']['original']['old function']($link);
}
else {
return $link;
}but this feels a bit of a hack as it's adding a special case for the Theme Developer module (and an else for a nicer fallback if there are any other modules with the same conflict). Is there a better way to handle this?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1992006_menu_minipanels_devel_themer.patch | 756 bytes | dasjo |
Comments
Comment #1
fox_01 commentedSame prob here
Comment #2
alexb03060 commentedJust ran into this problem myself. Any solutions?
Comment #3
dasjoComment #4
jaydee1818 commentedPatch #3 worked for me
Comment #5
ianthomas_ukPatch #3 is my code from the issue summary. It does work, but isn't a particularly nice solution, as other modules may have the same problem.
Comment #6
banoodle commentedPatch #3 worked for me - thanks!!!!
Comment #7
tripper54 commented@ianthomas_uk , I agree with you that this is probably not the most elegant solution. However, it works, and doesn't break anything else, so I think it should be RTBC failing any better suggestions.
Comment #8
damienmckennaThank you for the effort you put into this patch, I do appreciate it. However, I'm going to go with the patch from #2213851: Performance consideration for sites with large theme registry which also may improve site performance.