From b6262a4c09c4b523328ba0e73fccd3de81ffa730 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 19 Mar 2014 12:01:45 +1300 Subject: [PATCH] ensure backtrace is on for test entity create & delete --- CRM/Core/DAO.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index ae59e51092..2e0f4ab65a 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1264,6 +1264,11 @@ SELECT contact_id $numObjects = 1, $createOnly = FALSE ) { + //this is a test function also backtrace is set for the test suite it sometimes unsets itself + // so we re-set here in case + $config = CRM_Core_Config::singleton(); + $config->backtrace = TRUE; + static $counter = 0; CRM_Core_DAO::$_testEntitiesToSkip = array( 'CRM_Core_DAO_Worldregion', @@ -1427,8 +1432,12 @@ SELECT contact_id static function deleteTestObjects($daoName, $params = array( )) { + //this is a test function also backtrace is set for the test suite it sometimes unsets itself + // so we re-set here in case + $config = CRM_Core_Config::singleton(); + $config->backtrace = TRUE; - $object = new $daoName ( ); + $object = new $daoName(); $object->id = CRM_Utils_Array::value('id', $params); $deletions = array(); // array(array(0 => $daoName, 1 => $daoParams)) -- 2.25.1