Here is error i get when trying to replace a file
(I removed the exact url of my website for security reasons)

Warning: Invalid argument supplied for foreach() in
wp-content/plugins/enable-media-replace/upload.php on line 55

Warning: Cannot modify header information - headers already sent by (output started at wp-content/plugins/enable-media-replace/upload.php:55) in wp-includes/pluggable.php on line 876
Thank you for creating with WordPress.

Thank you. The plugin is working now. I did notice one difference from how it used to function.

Before the update,

after selecting "Just Replace", the image file would display as the new file immediately.
There was no "cache" issue with the old file still displaying.

Now,

after "Just Replacing", the old image file thumbnail still displays in the media manager, even though the new file is indeed uploaded. If you open in a new tab and refresh a few times, then it displays correctly. but i don't remember it doing this before. It would immediately display the new image file.

the browser caching of the preview thumbnail is an issue that is sadly out of my control. I see it sometimes on my own sites as well, and it has to do with how the browser determines that it already has that particular image in the cache. There is no way for me from the plugin/server side to invalidate the browser cached images, unfortunately.