Critical incompatibility with Shield Security plugin
-
After updating WP-Optimize from version 3.2.7 to 3.2.9, several of my websites crashed to the point that I received those “your site is experiencing a technical issue” emails and had to log in using recovery mode. The following error was reported:
An error of type E_COMPILE_ERROR was caused in line 26 of the file /var/www/wp-content/plugins/wp-simple-firewall/src/lib/src/Modules/AuditTrail/Lib/LogHandlers/LocalDbWriter.php. Error message: Declaration of FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Lib\LogHandlers\LocalDbWriter::write(array $record) must be compatible with Monolog\Handler\AbstractProcessingHandler::write(array $record): void
Again, this error completely crashes the website.
While it is Shield Security throwing up this error, it only started happening after updating WP-Optimize. Deactivating either plugin fixes the issue.
I reported this to Shield Security, and their developer had this to say:
It appears to be Shield generating the error, but as you’ve discovered, it’s both plugins together causing the problem. We each have a different, incompatible, version of the PHP monolog library distributed with our plugin. Our plugin throws the error just by the timing of the included library.
We include a version of the monolog library that is most widely compatible with more WordPress sites. WPOptimise has unfortunately chosen a version of the library (v2.3.5) that is only compatible with PHP 7.2+. This is strange since their plugin states PHP 5.6+ compatibility. You’ll want to ask them if they’d consider using an older version of the library.
You can see the original post from the Shield support forum here: https://wordpress.org/support/topic/critical-incompatibility-with-wp-optimize-plugin/
It appears that a similar issue was reported here a few months ago:
Are you able to switch to using a more compatible version of the monolog library, as Shield Security suggests?
The topic ‘Critical incompatibility with Shield Security plugin’ is closed to new replies.