I run into an error I cannot explain (I lack the skils) where I can use the help of the community.

I;m trying to get the Mollie payment provider working with Omnipay Multiprocessor extension.

When I submit a paid event registration I get a fatal error with:

Exception: Serialization of 'Closure' is not allowed in serialize()
(line 156 of CRM/Core/BAO/Cache.php).

The line from that file it stumbles upon is:

public static function setItem(&$data, $group, $path, $componentID = NULL) {
$dataSerialized = serialize($data);

When I put some debug code into that file I get the content of $data:

    [defaults] => Array

    [constants] => Array

    [values] => Array
            [Register] => Array
                    [qfKey] => 60b217c8aa3b27fef940a9e5e9b7fb55_7233
                    [entryURL] => https://www.ourdomain.nl/civicrm/event/register?reset=1&id=1
                    [first_name] => iemand
                    [last_name] => eennaam
                    [email-Primary] => user@localhost.net
                    [hidden_processor] => 1
                    [scriptFee] => 
                    [scriptArray] => 
                    [additional_participants] => 
                    [priceSetId] => 7
                    [price_8] => 16
                    [payment_processor_id] => 3
                    [bypass_payment] => 
                    [_qf_default] => Register:upload
                    [MAX_FILE_SIZE] => 134217728
                    [_qf_Register_upload] => Continue

            [Confirm] => Array
                    [qfKey] => 60b217c8aa3b27fef940a9e5e9b7fb55_7233
                    [entryURL] => https://www.ourdomain.nl/civicrm/event/register?reset=1&id=1
                    [_qf_default] => Confirm:next
                    [_qf_Confirm_next] => Continue

            [ThankYou] => Array


    [valid] => Array
            [Register] => 1
            [Confirm] => 1
            [ThankYou] => 

    [_qf_button_name] => _qf_Confirm_next

I lack the skills and knowledge to understand why this throws the 'Exception: Serialization of 'Closure' is not allowed' error. Anyone who spots the problem or has a clue to find an answer?

(php 7.0 but also with 5.6 / civicrm 4.7.14 / drupal 7.53)

  • Your PHP version might be significant here - would you update to include that? – Chris Burgess Dec 12 '16 at 22:45
  • edited my question. good point! – Richard van Oosterhout Dec 12 '16 at 22:47
  • I've just run across this also, using a (different) Omnipay processor, so I'd guess it's something in there. Agreed that it doesn't appear to be php7 version specific. – Alan Dixon May 1 '17 at 16:09

The answer appears to be that something is getting put in the session by the omnipay code that the CiviCRM caching code doesn't like. Here's the issue that describes the full details:


And here's a patch Eileen includes that seems to have solved the issue:


FWIW - most of the thread is involved in getting good debug info.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.