Recent update of bulletproof broke site
-
We are running php 5.6 and have been for quite some time.
This morning we saw wp has experienced an error message, site was down.
The error was:
[Sun Jan 30 08:27:56 2022] [warn] [client 95.46.8.176] mod_fcgid: stderr: PHP Parse error: syntax error, unexpected ':', expecting ';' or '{' in /wp-content/plugins/bulletproof-security/includes/mscan-ajax-functions.php on line 118, referer: https://144.217.83.237/
Turns out the offending code was not 5.6 compatible:
if ( version_compare( PHP_VERSION, '9.0.0', '>=' ) ) { // Note: On Windows XAMPP ONLY backslashes \ are used in getSubPathName paths. On Linux ONLY forward slashes / are used in paths. class BPSMScanRecursiveFilterIterator extends RecursiveFilterIterator { public function accept():bool {
First thing, pretty sure we’re not on php 9, I am currently coding using the latest which is 8.1.x, second thing is that regardless of this check the :bool returning a boolean type on the accept() function is throwing the error as 5.6 has no idea what to do with this syntax. I removed the
:bool
and the site started working again.We have updates to this plugin set to install automatically.
This is from the main file, I hope you guys keep the version uptodate here:
Plugin Name: BulletProof Security Plugin URI: https://forum.ait-pro.com/read-me-first/ Text Domain: bulletproof-security Domain Path: /languages/ Description: <strong>Feature Highlights:</strong> Setup Wizard • MScan Malware Scanner • .htaccess Website Security Protection (Firewalls) • Security Logging|HTTP Error Logging • DB Backup • DB Table Prefix Changer • Login Security & Monitoring • JTC-Lite Login Form Bot Lockout Protection • Idle Session Logout (ISL) • Auth Cookie Expiration (ACE) • System Info: Extensive System, Server and Security Status Information • FrontEnd|BackEnd Maintenance Mode • WP Automatic Update Options (BPS MU Tools must-use plugin) • Force Strong Passwords • Email Alerts When New Plugins And Themes Are Available. Version: 5.7 Author: AITpro Website Security Author URI: https://forum.ait-pro.com/read-me-first/
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Recent update of bulletproof broke site’ is closed to new replies.