Skip to content

Commit 3de622b

Browse files
Remove gateway from object in error #17
This prevents problems caching the object
1 parent b01a2c0 commit 3de622b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CRM/Core/Payment/PaymentExtended.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ protected function getPaymentDescription($params, $length = 24) {
285285
* @throws \Civi\Payment\Exception\PaymentProcessorException
286286
*/
287287
protected function handleError($level, $message, $context, $errorCode = 9001, $userMessage = NULL) {
288+
// Reset gateway to NULL so don't cache it. The size of the object or closures within it could
289+
// cause problems when serializing & saving.
290+
$this->gateway = NULL;
288291
if (omnipaymultiprocessor__versionAtLeast(4.5)) {
289292
$log = new CRM_Utils_SystemLogger();
290293
$log->log($level, $message, (array) $context);

0 commit comments

Comments
 (0)