Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
capo
mjwshared
Commits
fa09c7f4
Commit
fa09c7f4
authored
Feb 21, 2020
by
capo
Browse files
Switch to camelCase: exitOnException
parent
ef032b99
Changes
1
Hide whitespace changes
Inline
Side-by-side
CRM/Core/Payment/MJWIPNTrait.php
View file @
fa09c7f4
...
...
@@ -37,7 +37,7 @@ trait CRM_Core_Payment_MJWIPNTrait {
/**
* Exit on exceptions (TRUE), or just throw them (FALSE).
*/
protected
$exit
_on_e
xception
=
TRUE
;
protected
$exit
OnE
xception
=
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_e
xception Switch between:
* @param bool $exit
OnE
xception 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_e
xception
)
{
$this
->
exit
_on_e
xception
=
$exit
_on_e
xception
;
public
function
setExceptionMode
(
$exit
OnE
xception
)
{
$this
->
exit
OnE
xception
=
$exit
OnE
xception
;
}
/**
...
...
@@ -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_e
xception
)
{
if
(
$this
->
exit
OnE
xception
)
{
http_response_code
(
400
);
exit
(
1
);
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment