[REF] Deprecate passing a blank currecny to CRM_Utils_Money::format and also update...
[civicrm-core.git] / CRM / Core / Error.php
index 4011b3e0afa3f0b6088d8d90fb6bf3be86d70d33..1aa9733b5d44f348090092a16b4f777b92e89878 100644 (file)
@@ -1039,7 +1039,15 @@ class CRM_Core_Error extends PEAR_ErrorStack {
       $callerClass = $dbt[1]['class'] ?? NULL;
       $oldMethod = "{$callerClass}::{$callerFunction}";
     }
-    Civi::log()->warning("Deprecated function $oldMethod, use $newMethod.", ['civi.tag' => 'deprecated']);
+    self::deprecatedWarning("Deprecated function $oldMethod, use $newMethod.");
+  }
+
+  /**
+   * Output a deprecated notice about a deprecated call path, rather than deprecating a whole function.
+   * @param string $message
+   */
+  public static function deprecatedWarning($message) {
+    Civi::log()->warning($message, ['civi.tag' => 'deprecated']);
   }
 
 }