Commit fa09c7f4 authored by capo's avatar capo
Browse files

Switch to camelCase: exitOnException

parent ef032b99
......@@ -37,7 +37,7 @@ trait CRM_Core_Payment_MJWIPNTrait {
/**
* Exit on exceptions (TRUE), or just throw them (FALSE).
*/
protected $exit_on_exception = TRUE;
protected $exitOnException = TRUE;
/**
* Set the value of is_email_receipt to use when a new contribution is received for a recurring contribution
......@@ -319,12 +319,12 @@ trait CRM_Core_Payment_MJWIPNTrait {
/**
* Switch between "exit on exception" mode and "regular exception handling".
*
* @param bool $exit_on_exception Switch between:
* @param bool $exitOnException Switch between:
* - TRUE (default): Exit with HTTP response code 400 when an exception occurs
* - FALSE: Just throw the exception regularly
*/
public function setExceptionMode($exit_on_exception) {
$this->exit_on_exception = $exit_on_exception;
public function setExceptionMode($exitOnException) {
$this->exitOnException = $exitOnException;
}
/**
......@@ -335,7 +335,7 @@ trait CRM_Core_Payment_MJWIPNTrait {
protected function exception($message) {
$errorMessage = $this->_paymentProcessor->getPaymentProcessorLabel() . ' Exception: Event: ' . $this->event_type . ' Error: ' . $message;
Civi::log()->debug($errorMessage);
if ($this->exit_on_exception) {
if ($this->exitOnException) {
http_response_code(400);
exit(1);
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment