• Good Morning!
    I recently took over the maintenance of the site above, which was severely out of date. I ran all of the core, plugin and theme updates to bring it up to speed with the latest release of PHP and WordPress. Since then I have had issues getting Sermon Manager to function properly. Last night I received an email from WordPress detailing an error that was thrown when one of our users tried to upload a new sermon. I have attached the error log below. Any help would be greatly appreciated!

    Error Details
    =============
    An error of type E_ERROR was caused in line 627 of the file /home/a1cgr3enro0f/public_html/wp-content/plugins/sermon-manager-for-wordpress/sermons.php. Error message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /home/a1cgr3enro0f/public_html/wp-content/plugins/sermon-manager-for-wordpress/sermons.php:627
    Stack trace:
    #0 /home/a1cgr3enro0f/public_html/wp-includes/class-wp-hook.php(305): SermonManager->{closure}()
    #1 /home/a1cgr3enro0f/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #2 /home/a1cgr3enro0f/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
    #3 /home/a1cgr3enro0f/public_html/wp-includes/post.php(3207): do_action()
    #4 /home/a1cgr3enro0f/public_html/wp-admin/edit.php(174): wp_delete_post()
    #5 {main}
     thrown

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author wpforchurch

    (@wpforchurch)

    Hi @dtwilliams10, I tried to replicate your issue (uploading new sermon) but no error was found on my end. Below is the version I’m using.

      WordPress 5.8.2
      PHP 7.4.25
      Sermon Manager for WordPress 2.16.8

    But you can try replacing the code see if this works.
    In your plugin file /wp-content/plugins/sermon-manager-for-wordpress/sermons.php Line:627

    Replace:
    if(count($sermons_array)>0){

    With:
    if(is_array($sermons_array) && count($sermons_array)>0){

    Let me know if this will work

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal Error’ is closed to new replies.