Title: Fatal Error
Last modified: November 11, 2021

---

# Fatal Error

 *  [dtwilliams10](https://wordpress.org/support/users/dtwilliams10/)
 * (@dtwilliams10)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-4013/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-4013%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [wpforchurch](https://wordpress.org/support/users/wpforchurch/)
 * (@wpforchurch)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-4013/#post-15059429)
 * Hi [@dtwilliams10](https://wordpress.org/support/users/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.
    1.  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.
    -  This reply was modified 4 years, 6 months ago by [wpforchurch](https://wordpress.org/support/users/wpforchurch/).
    -  This reply was modified 4 years, 6 months ago by [wpforchurch](https://wordpress.org/support/users/wpforchurch/).
    -  This reply was modified 4 years, 6 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).

Viewing 1 replies (of 1 total)

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

 * ![](https://s.w.org/plugins/geopattern-icon/sermon-manager-for-wordpress_688896.
   svg)
 * [Sermon Manager](https://wordpress.org/plugins/sermon-manager-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sermon-manager-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [wpforchurch](https://wordpress.org/support/users/wpforchurch/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-4013/#post-15059429)
 * Status: not resolved