Title: PHP Fatal Error
Last modified: June 4, 2023

---

# PHP Fatal Error

 *  Resolved [AWOL](https://wordpress.org/support/users/awol/)
 * (@awol)
 * [3 years ago](https://wordpress.org/support/topic/php-fatal-error-367/)
 * This is probably an edge case, but I thought you should be aware of it. My site
   suddenly started throwing an error, and in the debug log (turned on in wp-config)
   was 15 of these messages, from one visit to the home page when logged out;
 *     ```wp-block-code
       PHP Fatal error:  Uncaught Exception:  subcript_period parameter must be integer in SwpmUtils::calculate_subscription_period_days method in /home/awolonl1/sentlive.com/wp-content/plugins/simple-membership/classes/class.swpm-utils.php:59
       ```
   
 * While that obviously flags this plugin, there has been no updates recently, and
   I hadn’t made any changes connected to this plugin. However today I have been
   playing with my widgets, and I added one specifically for mobile that was a partial
   duplicate of one I have been using for a long time that outputs member info using
   shortcodes. It turns out that it was only one of these causing the issue – [swpm_show_member_info
   column=”expiry_date”] – by a process of elimination I worked out that if it is
   only present in one widget, either desktop or mobile, the problem does not occur,
   nor does it when the user is logged in and both are in place; and the strangest
   thing of all is that these widgets are not displayed to logged out users at all(
   I have my sidebars hidden using css and the widgets in question are set to only
   show to logged in users, using the Widget Options plugin)! Hopefully I can find
   a way to work around this (perhaps by generating my own shortcode in my theme
   functions), but it seems likely that there is some flaw in the code that doesn’t
   allow the shortcode to be used twice even if it is not displaying. The three 
   other shortcodes I use in the same widgets – [swpm_show_member_info column=”user_name”],[
   swpm_show_member_info column=”membership_level_name”] and [swpm_show_member_info
   column=”member_since_formatted”] work perfectly in the two widgets.

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

 *  Thread Starter [AWOL](https://wordpress.org/support/users/awol/)
 * (@awol)
 * [3 years ago](https://wordpress.org/support/topic/php-fatal-error-367/#post-16792283)
 * I just looked on the plugin site support forum and found this topic from April–
   [https://simple-membership-plugin.com/forums/topic/swpm-show-member-info-shortcode-issue/](https://simple-membership-plugin.com/forums/topic/swpm-show-member-info-shortcode-issue/)–
   referring to something similar – on there it says resolved but there was no actual
   answer as to how to fix it? And another one from December 2021 – [https://simple-membership-plugin.com/forums/topic/smperror-when-loading-page-mysite-membership-login-membership-profile/](https://simple-membership-plugin.com/forums/topic/smperror-when-loading-page-mysite-membership-login-membership-profile/)–
   also related to the same shortcode. Again no answer as to how to resolve it.
    -  This reply was modified 3 years ago by [AWOL](https://wordpress.org/support/users/awol/).
 *  Thread Starter [AWOL](https://wordpress.org/support/users/awol/)
 * (@awol)
 * [3 years ago](https://wordpress.org/support/topic/php-fatal-error-367/#post-16792294)
 * I think I might have solved it – the new widget was not set to only show to logged
   in users but to everyone; correcting that and the problem has gone. However it
   would be easy for someone else to fall foul of this if they, like I did, had 
   hidden their sidebar completely. But now it makes sense because the plugin can’t
   retrieve an expiry date for a logged out user, so probably some check on user
   login status needs to be inserted in the code that is trying to get the data.
 *  Plugin Support [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [3 years ago](https://wordpress.org/support/topic/php-fatal-error-367/#post-16792921)
 * Hi, I am glad you found a solution to your problem. However we currently don’t
   have an integration with the following plugin. [https://wordpress.org/plugins/widget-options/](https://wordpress.org/plugins/widget-options/)
 * Kind regards.

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

The topic ‘PHP Fatal Error’ is closed to new replies.

 * ![](https://ps.w.org/simple-membership/assets/icon-128x128.png?rev=974529)
 * [Simple Membership](https://wordpress.org/plugins/simple-membership/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-membership/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-membership/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-membership/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-membership/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-membership/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/php-fatal-error-367/#post-16792921)
 * Status: resolved