Hi Gerard,
Here is the site admin email I received after the error:
Howdy!
Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, Envira Gallery.
First, visit your website (https://www.niagaracc.suny.edu/) and check for any visible issues. Next, visit the page where the error was caught (https://www.niagaracc.suny.edu/wp-admin/upload.php?page=enable-media-replace%2Fenable-media-replace.php&action=media_replace_upload&attachment_id=50508&_wpnonce=47c8366b1c&noheader=1) and check for any visible issues.
Please contact your host for assistance with investigating this issue further.
If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.
https://www.niagaracc.suny.edu/wp-login.php?action=enter_recovery_mode&rm_token=840O707ARUkGHkvqNtW6Ed&rm_key=eGEDywCz42Zp8Zq3Rlvz34
To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 5.8.3
Current theme: NCCC (version 0.1)
Current plugin: Envira Gallery (version 1.9.4.1)
PHP version 8.0.14
Error Details
=============
An error of type E_ERROR was caused in line 1061 of the file /nas/content/live/niagaraccc/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php. Error message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /nas/content/live/niagaraccc/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php:1061
Stack trace:
#0 /nas/content/live/niagaraccc/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php(1061): count('')
#1 /nas/content/live/niagaraccc/wp-includes/class-wp-hook.php(303): Envira\Admin\Admin_Container->emr_clear_envira_cache('https://www.nia...', 'https://www.nia...', 50508)
#2 /nas/content/live/niagaraccc/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
#3 /nas/content/live/niagaraccc/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#4 /nas/content/live/niagaraccc/wp-content/plugins/enable-media-replace/classes/replacer.php(254): do_action('enable-media-re...', 'https://www.nia...', 'https://www.nia...', 50508)
#5 /nas/content/live/niagaraccc/wp-content/plugins/enable-media-replace/views/upload.php(159): EnableMediaReplace\Replacer->replaceWith('/tmp/php61KW6S', 'Meat_Raffle_202...')
#6 /nas/content/live/niagaraccc/wp-content/plugins/enable-media-replace/classes/emr-plugin.php(163): require_once('/nas/content/li...')
#7 /nas/content/live/niagaraccc/wp-includes/class-wp-hook.php(303): EnableMediaReplace\EnableMediaReplacePlugin->route('')
#8 /nas/content/live/niagaraccc/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
#9 /nas/content/live/niagaraccc/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#10 /nas/content/live/niagaraccc/wp-admin/admin.php(259): do_action('media_page_enab...')
#11 /nas/content/live/niagaraccc/wp-admin/upload.php(10): require_once('/nas/content/li...')
#12 {main}
thrown