From bc27f510b73930bdb873984c50ce4d6a9f3c2954 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 13 Dec 2018 13:07:53 +1300 Subject: [PATCH] Add default for in Exception class. More similar to parent & fixes a notice --- api/Exception.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/Exception.php b/api/Exception.php index 8c6ca5ba73..dffc00bd65 100644 --- a/api/Exception.php +++ b/api/Exception.php @@ -106,7 +106,7 @@ class CiviCRM_API3_Exception extends Exception { * @param Exception|NULL $previous * A previous exception which caused this new exception. */ - public function __construct($message, $error_code, $extraParams = array(), Exception $previous = NULL) { + public function __construct($message, $error_code = 0, $extraParams = array(), Exception $previous = NULL) { parent::__construct(ts($message)); $this->extraParams = $extraParams + array('error_code' => $error_code); } -- 2.25.1