Title: Fatal error when using PHP 7.1
Last modified: February 7, 2017

---

# Fatal error when using PHP 7.1

 *  Resolved [Jared Atchison](https://wordpress.org/support/users/jaredatch/)
 * (@jaredatch)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/)
 * Fatal error: Cannot use lexical variable $eventName as a parameter name in wptest/
   wp-content/plugins/constant-contact-forms/vendor/constantcontact/guzzlehttp/guzzle/
   src/Event/Emitter.php on line 48
 * Downgrading to PHP 7.0.x resolves the issue.
    -  This topic was modified 9 years, 3 months ago by [Jared Atchison](https://wordpress.org/support/users/jaredatch/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [9 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/#post-8754625)
 * Hi Jared,
 * I believe this will be fixed in 1.2.1, which will probably be next week at the
   earliest. We’ll be upgrading the Guzzle library to version 5.3.1 at that point,
   as we had someone else report a similar issue at [https://wordpress.org/support/topic/update-guzzle/](https://wordpress.org/support/topic/update-guzzle/).
 * You should be able to drop in that version of Guzzle now if you really want to
   get a head start.
 * Thanks for letting us know about this, regardless 🙂
 *  Plugin Author [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * (@constantcontact)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/#post-8853369)
 * Marking resolved as it was cared for in 1.2.1 Thanks again, Jared.
 *  [trevnetmedia](https://wordpress.org/support/users/trevnetmedia/)
 * (@trevnetmedia)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/#post-9358502)
 * This IS NOT fixed in Version 1.3.3 as of today running PHP 7. I reverted to PHP
   5.6 and it worked. I’d much rather be running PHP 7.
 * ==> wp-admin/error_log <==
    [27-Jul-2017 19:40:49 UTC] PHP Fatal error: Uncaught
   Error: Call to undefined function GuzzleHttp\json_last_error() in /home/lisatanker/
   public_html/wp-content/plugins/constant-contact-forms/vendor/constantcontact/
   guzzlehttp/guzzle/src/Utils.php:144 Stack trace: #0 /home/******/public_html/
   wp-content/plugins/constant-contact-forms/vendor/constantcontact/guzzlehttp/guzzle/
   src/Message/Response.php(145): GuzzleHttp\Utils::jsonDecode(‘[{“id”:”########…’,
   true, 512, 0) #1 /home/******/public_html/wp-content/plugins/constant-contact-
   forms/vendor/constantcontact/constantcontact/constantcontact/src/Ctct/Services/
   ListService.php(46): GuzzleHttp\Message\Response->json() #2 /home/******/public_html/
   wp-content/plugins/constant-contact-forms/includes/class-api.php(205): Ctct\Services\
   ListService->getLists(‘######’) #3 /home/******/public_html/wp-content/plugins/
   constant-contact-forms/includes/class-lists.php(788): ConstantContact_API->get_lists(
   false) #4 /home/******/public_html/wp-content/plugins/constant-contact-forms/
   includes/clas in /home/******/public_html/wp-content/plugins/constant-contact-
   forms/vendor/constantcontact/guzzlehttp/guzzle/src/Utils.php on line 144
    -  This reply was modified 8 years, 10 months ago by [trevnetmedia](https://wordpress.org/support/users/trevnetmedia/).
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [8 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/#post-9358545)
 * Good day [@trevnetmedia](https://wordpress.org/support/users/trevnetmedia/)
 * To be technical, the original issue presented by Jared was fixed. The error you’re
   providing is a different one. However, yes it’s true that both are in fact causing
   fatal errors. It’s also a 3rd party library that we’re using for it, so we may
   want to check with that provider and see if they’ve done any recent bug fixes
   to address this one.
 * My biggest question at the moment is what steps or actions are you taking that
   is causing this?
 *  [trevnetmedia](https://wordpress.org/support/users/trevnetmedia/)
 * (@trevnetmedia)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/#post-9358595)
 * I simply installed it and went to “Lists” page, but got the 500 error. All good
   being technical. =) I got it working now on PHP 5.6. But would definitely love
   to see a fix that works in 7-7.1. Thanks so much!
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [8 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/#post-9358631)
 * Not managing to recreate the issue with those steps on PHP 7.1, that said if 
   you want to help test something with the 3rd party lib, I have my theory for 
   how to fix the error.
 * [https://github.com/guzzle/guzzle/blob/5.3/src/Utils.php#L148-L149](https://github.com/guzzle/guzzle/blob/5.3/src/Utils.php#L148-L149)
 * both lines highlighted have `json_last_error()`. My theory is that both need 
   to be done with a `\` in front, so `\json_last_error()`. That’ll force them to
   look at the global namespace. Guzzle doesn’t appear to define their own function
   with that name.
 *  [trevnetmedia](https://wordpress.org/support/users/trevnetmedia/)
 * (@trevnetmedia)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/#post-9361684)
 * It wasn’t working with PHP 7.0. I installed 7.1 on our server and it’s working
   now. But the emails were not being sent to WP-Cron (even after going through 
   your sticky post regarding this), so I’ve abandoned your plugin all together 
   now.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Fatal error when using PHP 7.1’ is closed to new replies.

 * ![](https://ps.w.org/constant-contact-forms/assets/icon-256x256.png?rev=2951825)
 * [Constant Contact Forms](https://wordpress.org/plugins/constant-contact-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/constant-contact-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/constant-contact-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/constant-contact-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/constant-contact-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/constant-contact-forms/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [trevnetmedia](https://wordpress.org/support/users/trevnetmedia/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-when-using-php-7-1/#post-9361684)
 * Status: resolved