CRM-17789 - Fix Notice Error on PHP 7
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 12 Sep 2016 13:22:46 +0000 (18:52 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 12 Sep 2016 13:22:46 +0000 (18:52 +0530)
CRM/Core/DAO.php

index a66c1ca63a410bd1c2ceaaae08a9c64dedcb6f39..4747adee2fab323a4c3e4c693ce800bce0c87bbd 100644 (file)
@@ -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');
     }