From b064b7052ff2cb2b490a05266b4e31d52848dd7e Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 1 Jul 2019 23:53:10 +1200 Subject: [PATCH] dev/core#1088 Fix fatal error when copying profile with civirules enabled Fixes a bug where the DAO name was not passed to the hook when copying a profile. --- CRM/Core/DAO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index f4593a4bd5..e2adbc6f7e 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1672,7 +1672,7 @@ FROM civicrm_domain } $newObject->save(); $newObject->copyCustomFields($object->id, $newObject->id); - CRM_Utils_Hook::post('create', CRM_Core_DAO_AllCoreTables::getBriefName($daoName), $newObject->id, $newObject); + CRM_Utils_Hook::post('create', CRM_Core_DAO_AllCoreTables::getBriefName(str_replace('_BAO_', '_DAO_', $daoName)), $newObject->id, $newObject); } return $newObject; -- 2.25.1