diff --git a/CRM/Core/Payment/PaymentExtended.php b/CRM/Core/Payment/PaymentExtended.php index 848fe0abc..5dfefa52e 100644 --- a/CRM/Core/Payment/PaymentExtended.php +++ b/CRM/Core/Payment/PaymentExtended.php @@ -381,6 +381,19 @@ protected function getPrefix() { } } + + /** + * Implement http://php.net/manual/en/class.serializable.php + * + * Removes unserializable elements when the class is serialised. + * + * @return string + */ + public function serialize() { + $this->cleanupClassForSerialization(TRUE); + return serialize($this); + } + /** * Unset various objects that will fail to serialize when the form is stored to session. *