• Resolved AWOL

    (@awol)


    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;

    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)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Fatal Error’ is closed to new replies.