Suppress E_NOTICE errors because we can end up with corrupted JSON from Drupal init.
authorChris Burgess <chris@giantrobot.co.nz>
Sat, 6 Jul 2013 13:25:36 +0000 (01:25 +1200)
committerChris Burgess <chris@giantrobot.co.nz>
Sun, 7 Jul 2013 06:03:38 +0000 (18:03 +1200)
CRM/Utils/System/Drupal.php
CRM/Utils/System/Drupal6.php

index b1e7e27a259d949570bfca3a308c9ab47d81e48e..50c84f7f472cef9817d94c823b318af15f13858f 100644 (file)
@@ -750,7 +750,8 @@ AND    u.status = 1
       }
     }
     require_once 'includes/bootstrap.inc';
-    drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+    // @ to suppress notices eg 'DRUPALFOO already defined'.
+    @drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
 
     // explicitly setting error reporting, since we cannot handle drupal related notices
     error_reporting(1);
index 81d75653616686b3d6cf0c2ecc687491b00e147c..46592e36ea39e6799106c9c37e666560a517fa88 100644 (file)
@@ -672,7 +672,8 @@ SELECT name, mail
       }
     }
     require_once 'includes/bootstrap.inc';
-    drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+    // @ to suppress notices eg 'DRUPALFOO already defined'.
+    @drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
 
     // explicitly setting error reporting, since we cannot handle drupal related notices
     error_reporting(1);