Open m-hefti opened 2 years ago
Thanks for the correction, it's greatly appreciated.
This should be merged. This fatal error happens on PHP version 8.0 and up.
As PHP 7.4 security updates stop in 6 days (28 Nov 2022), and many hosting providers have already moved sites to use PHP 8 it would be of utmost priority to publish a new version of this plugin to the WP plugin directory with this fix included.
This pull request fixes #193
Would love to help keep this plugin alive here, and on wordpress.org.
While deleting a media, you might get an error about classes/class.attachments.search.php:64 count() expecting an array and getting a null value. The $params['fields'] var might be an array or a null value (by default). If null, the count() function in the for loop (line 65) returns an error. Adding the if statement (line 64) resolves the problem.