a8cteam51 / safety-net

Scrub options, deactivate denylisted plugins, and delete user data on development sites.
20 stars 1 forks source link

Protect against two copies of plugin being activated #37

Closed NickGreen closed 2 years ago

NickGreen commented 2 years ago

We had a situation where the plugin was already activated in the regular plugins folder, and the CLI tool tried to add it to mu-plugins, and it threw a fatal and sent an email.

An error of type E_COMPILE_ERROR was caused in line 17 of the file /srv/htdocs/wp-content/plugins/safety-net-trunk/includes/anonymize.php. Error message: Cannot redeclare SafetyNet\Anonymize\anonymize_data() (previously declared in /srv/htdocs/wp-content/mu-plugins/safety-net/includes/anonymize.php:18)