From: jitendrapurohit Date: Mon, 12 Sep 2016 13:22:46 +0000 (+0530) Subject: CRM-17789 - Fix Notice Error on PHP 7 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f720cdf056d27aa561fcfe6ef4d41fa3a945e41e;p=civicrm-core.git CRM-17789 - Fix Notice Error on PHP 7 --- diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index a66c1ca63a..4747adee2f 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -107,7 +107,8 @@ class CRM_Core_DAO extends DB_DataObject { if (defined('CIVICRM_DAO_DEBUG')) { self::DebugLevel(CIVICRM_DAO_DEBUG); } - CRM_Core_DAO::setFactory(new CRM_Contact_DAO_Factory()); + $factory = new CRM_Contact_DAO_Factory(); + CRM_Core_DAO::setFactory($factory); if (CRM_Utils_Constant::value('CIVICRM_MYSQL_STRICT', CRM_Utils_System::isDevelopment())) { CRM_Core_DAO::executeQuery('SET SESSION sql_mode = STRICT_TRANS_TABLES'); }