You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some sermons will not open. It may be co-incidental but I note that it has happened when the sermon does not have a preached date (which is an optional field).
Although it may not be the root cause the WordPress fatal error reporter lists this stack trace:
Error Details
=============
An error of type E_ERROR was caused in line 628 of the file /home/deleted/public_html/wp-content/plugins/sermon-manager-for-wordpress/sermons.php. Error message: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, bool given in /home/deleted/public_html/wp-content/plugins/sermon-manager-for-wordpress/sermons.php:628
Stack trace:
#0 /home/deleted/public_html/wp-includes/class-wp-hook.php(305): SermonManager->{closure}()
#1 /home/deleted/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
#2 /home/deleted/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
#3 /home/deleted/public_html/wp-includes/post.php(3207): do_action()
#4 /home/deleted/public_html/wp-includes/revision.php(458): wp_delete_post()
#5 /home/deleted/public_html/wp-admin/edit-form-blocks.php(209): wp_delete_post_revision()
#6 /home/deleted/public_html/wp-admin/post.php(187): require('/home/deleted/...')
#7 {main}
thrown
Platform
WordPress Version: WordPress version 5.8 PHP Version: 8.0.9 Sermon Manager Version: Current plugin: Sermon Manager for WordPress (version 2.16.8)
Any Additional Info
Whilst I don't know what causes the array to be empty testing and, if empty, initialising $sermons_array resolves the problem. At the least this would appear to be a good defensive approach don't you think?
Expected Behaviour
Able to open a sermon to edit from sermon list.
Actual Behaviour
Platform
WordPress Version: WordPress version 5.8
PHP Version: 8.0.9
Sermon Manager Version: Current plugin: Sermon Manager for WordPress (version 2.16.8)
Any Additional Info
Whilst I don't know what causes the array to be empty testing and, if empty, initialising
$sermons_array
resolves the problem. At the least this would appear to be a good defensive approach don't you think?The text was updated successfully, but these errors were encountered: