Title: Error Exception
Last modified: February 27, 2024

---

# Error Exception

 *  Resolved [devdavi](https://wordpress.org/support/users/devdavi/)
 * (@devdavi)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-exception-2/)
 * Line 340 of /includes/admin.php could use an error check if the value is null.
   Currently if the plugin cannot fetch the session var, it throws an error. Suggested
   modification, change this:
 *     ```wp-block-code
       if ($_SESSION['settings_turned_of'] === false && ($apiActiveNotConfigured || $smtpActiveNotConfigured) ) { ?>
       ```
   
 * to this:
 *     ```wp-block-code
       if (isset($_SESSION['settings_turned_of']) && $_SESSION['settings_turned_of'] === false && ($apiActiveNotConfigured || $smtpActiveNotConfigured)) { ?>
       ```
   

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

 *  Moderator [Bet Hannon](https://wordpress.org/support/users/bethannon1/)
 * (@bethannon1)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-exception-2/#post-17460463)
 * Just seconding the issue. We see this as warnings however:
 * **Warning**: Undefined global variable $_SESSION in **/home/{redacted}.cloudwaysapps.
   com/khtnaqcrqp/public_html/wp-content/plugins/mailgun/includes/admin.php** on
   line **340**
 * **Warning**: Trying to access array offset on value of type null in **/home/****{
   redacted}**.cloudwaysapps.com/khtnaqcrqp/public_html/wp-content/plugins/mailgun/
   includes/admin.php on line **340**
 *  [352digital](https://wordpress.org/support/users/352digital/)
 * (@352digital)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-exception-2/#post-17463194)
 * [@devdavi](https://wordpress.org/support/users/devdavi/)’s reply fixed it for
   me.
 *  Moderator [Bet Hannon](https://wordpress.org/support/users/bethannon1/)
 * (@bethannon1)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-exception-2/#post-17463748)
 * That’s great, 352digital. I’m sure that will help the Mailgun team get it fixed.
 * I’m running this plugin on over 85 sites, however, and making manual edits to
   the plugin on all those sites just isn’t practical.
 *  [gravnetic](https://wordpress.org/support/users/gravnetic/)
 * (@gravnetic)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-exception-2/#post-17482618)
 * I am also seeing this issue, and with the following error when debug / debug 
   display is set to true.
 * **Warning**: Undefined global variable $_SESSION in **/sites/cftetonvalley.org/
   files/wp-content/plugins/mailgun/includes/admin.php** on line **340**
 * **Warning**: Trying to access array offset on value of type null in **/sites/
   cftetonvalley.org/files/wp-content/plugins/mailgun/includes/admin.php** on line**
   340**
 *  [pauldejongnu](https://wordpress.org/support/users/pauldejongnu/)
 * (@pauldejongnu)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-exception-2/#post-17487823)
 * I’m also seeing this, this was introduced in the latest version of the plugin(
   1.9.8). Please fix.
    -  This reply was modified 2 years, 3 months ago by [pauldejongnu](https://wordpress.org/support/users/pauldejongnu/).

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

The topic ‘Error Exception’ is closed to new replies.

 * ![](https://ps.w.org/mailgun/assets/icon-256x256.png?rev=2434524)
 * [Mailgun for WordPress](https://wordpress.org/plugins/mailgun/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailgun/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailgun/)
 * [Active Topics](https://wordpress.org/support/plugin/mailgun/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailgun/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailgun/reviews/)

 * 5 replies
 * 5 participants
 * Last reply from: [pauldejongnu](https://wordpress.org/support/users/pauldejongnu/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/error-exception-2/#post-17487823)
 * Status: resolved