CRM-17311 wrap call to watchdog in function_exists
authoreileenmcnaugton <eileen@fuzion.co.nz>
Wed, 30 Sep 2015 10:19:50 +0000 (23:19 +1300)
committermonishdeb <monish.deb@webaccessglobal.com>
Mon, 5 Oct 2015 20:31:02 +0000 (02:01 +0530)
CRM/Utils/System/DrupalBase.php

index 56cf330f94d72982dea8d1b9bb198b4e76438ed5..3fb5d8effa645dc6a93c5bcd7780e021f3ecadae 100644 (file)
@@ -264,7 +264,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base {
    * @inheritDoc
    */
   public function logger($message) {
-    if (CRM_Core_Config::singleton()->userFrameworkLogging) {
+    if (CRM_Core_Config::singleton()->userFrameworkLogging && function_exists('watchdog')) {
       watchdog('civicrm', '%message', array('%message' => $message), NULL, WATCHDOG_DEBUG);
     }
   }