Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.0.2
-
Fix Version/s: 3.1
-
Component/s: Drupal Integration Modules
-
Labels:None
Description
In the main civicrm.module, every drupal hook uses the following logic at the start of the hook.
if ( ! civicrm_initialize( ) )
{ return; }This is not so for all the other drupal integration modules, which do call civicrm_initialize(), but do not return on a failue. So, if for some reason civicrm couldn't be initialized, the user ends up with a fatal php error something along the lines of
Fatal error: require_once() [function.require]: Failed opening required 'CRM/Core/Config.php' (include_path='.:/home/tom/workspace/concern6/sites/concernfast.org/modules/civicrm:/home/tom/workspace/concern6/sites/example.com/modules/civicrm/packages:.:/usr/share/php:/usr/share/pear') in /home/tom/workspace/concern6/sites/example.com/modules/contrib/civicrm/drupal/modules/views/civicrm.views.inc on line 49
I think all the drupal integration code should gracefully return if civicrm couldn't be initialised, just like the main civicrm module.