Answers.Body: <p>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: </p>
  
  <p><a href="https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/issues/17" rel="nofollow noreferrer">https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/issues/17</a></p>
  
  <p>And here's a patch Eileen includes that seems to have solved the issue:</p>
  
  <p><a href="https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/commit/933806960e1a4c5968e9e6145feffb79eb77b415" rel="nofollow noreferrer">https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/commit/933806960e1a4c5968e9e6145feffb79eb77b415</a></p>
  
  <p>FWIW - most of the thread is involved in getting good debug info.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-01T16:22:51.783Z
Answers.LastActivityDate: 2017-05-01T16:22:51.783Z
Answers.UserDisplayName: Alan Dixon
Body: <p>I run into an error I cannot explain (I lack the skils) where I can use the help of the community.</p>
  
  <p>I;m trying to get the Mollie payment provider working with Omnipay Multiprocessor extension.</p>
  
  <p>When I submit a paid event registration I get a fatal error with:</p>
  
  <pre><code>Exception: Serialization of 'Closure' is not allowed in serialize()
  (line 156 of CRM/Core/BAO/Cache.php).
  </code></pre>
  
  <p>The line from that file it stumbles upon is:</p>
  
  <pre><code>public static function setItem(&amp;$data, $group, $path, $componentID = NULL) {
  (...)
  $dataSerialized = serialize($data);
  </code></pre>
  
  <p>When I put some debug code into that file I get the content of $data:</p>
  
  <pre><code>Array
  (
      [defaults] =&gt; Array
          (
          )
  
      [constants] =&gt; Array
          (
          )
  
      [values] =&gt; Array
          (
              [Register] =&gt; Array
                  (
                      [qfKey] =&gt; 60b217c8aa3b27fef940a9e5e9b7fb55_7233
                      [entryURL] =&gt; https://www.ourdomain.nl/civicrm/event/register?reset=1&amp;id=1
                      [first_name] =&gt; iemand
                      [last_name] =&gt; eennaam
                      [email-Primary] =&gt; user@localhost.net
                      [hidden_processor] =&gt; 1
                      [scriptFee] =&gt; 
                      [scriptArray] =&gt; 
                      [additional_participants] =&gt; 
                      [priceSetId] =&gt; 7
                      [price_8] =&gt; 16
                      [payment_processor_id] =&gt; 3
                      [bypass_payment] =&gt; 
                      [_qf_default] =&gt; Register:upload
                      [MAX_FILE_SIZE] =&gt; 134217728
                      [_qf_Register_upload] =&gt; Continue
                  )
  
              [Confirm] =&gt; Array
                  (
                      [qfKey] =&gt; 60b217c8aa3b27fef940a9e5e9b7fb55_7233
                      [entryURL] =&gt; https://www.ourdomain.nl/civicrm/event/register?reset=1&amp;id=1
                      [_qf_default] =&gt; Confirm:next
                      [_qf_Confirm_next] =&gt; Continue
                  )
  
              [ThankYou] =&gt; Array
                  (
                  )
  
          )
  
      [valid] =&gt; Array
          (
              [Register] =&gt; 1
              [Confirm] =&gt; 1
              [ThankYou] =&gt; 
          )
  
      [_qf_button_name] =&gt; _qf_Confirm_next
  )
  </code></pre>
  
  <p>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?</p>
  
  <p>(php 7.0 but also with 5.6 / civicrm 4.7.14 / drupal 7.53)</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-12T22:45:32.613Z
Comments.Text: Your PHP version might be significant here - would you update to include that?
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-12T22:47:09.720Z
Comments.Text: edited my question. good point!
Comments.UserDisplayName: Richard van Oosterhout
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-01T16:09:12.570Z
Comments.Text: 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.
Comments.UserDisplayName: Alan Dixon
Tags: <civievent><omnipay><mollie>
Title: Exception: Serialization of 'Closure' is not allowed in serialize() using CiviCRM with Omnipay & Mollie
ThreadText: # Exception: Serialization of 'Closure' is not allowed in serialize() using CiviCRM with Omnipay & Mollie
  
  (Asked by: username_0 on 2016-12-12)
  
  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:
  
  ```
  Array
  (
      [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)
  
  **Tags:** civievent, omnipay, mollie
  
  > **Comments:**
  > **username_1**: Your PHP version might be significant here - would you update to include that?  
  > **username_0**: edited my question. good point!  
  > **username_2**: 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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-05-01. Score: 3
  
  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:
  
  <https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/issues/17>
  
  And here's a patch Eileen includes that seems to have solved the issue:
  
  <https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/commit/933806960e1a4c5968e9e6145feffb79eb77b415>
  
  FWIW - most of the thread is involved in getting good debug info.
  
  
  ---
  
  