CRM_Core_Error - Don't display HTML crash when running tests
authorTim Otten <totten@civicrm.org>
Sat, 19 Sep 2015 05:03:20 +0000 (22:03 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 21 Sep 2015 04:24:28 +0000 (21:24 -0700)
CRM/Core/Error.php

index 0713da07d9c84c3291b1ef717c85812365737f10..fac4e88d02dc81206a65e76ef3619cda334ddbcc 100644 (file)
@@ -170,6 +170,9 @@ class CRM_Core_Error extends PEAR_ErrorStack {
    * @param object $pearError PEAR_Error
    */
   public static function handle($pearError) {
+    if (defined('CIVICRM_TEST')) {
+      return self::simpleHandler($pearError);
+    }
 
     // setup smarty with config, session and template location.
     $template = CRM_Core_Smarty::singleton();