PHP Warning: Trying to access array offset on value of type bool in php-file-editor.php

Home Forums BulletProof Security Pro PHP Warning: Trying to access array offset on value of type bool in php-file-editor.php

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #40042
    Walter Tengler
    Participant

    Hi,

    version 15.2 and i get lots of those errors:

    The problem is that i can not add any code in the Custom Code. It never stores the changes, makes the php error and leaves .htaccess unchanged.

    Any help ?

    Thanks

    Walter

    PHP Warning: Trying to access array offset on value of type bool in /var/www/vhosts/xxx/html/test/wp-content/plugins/bulletproof-security/admin/php/php-file-editor.php on line xxx
    #40043
    AITpro Admin
    Keymaster

    The PHP error has to do with the P-Security > File Editor and not Custom Code.  The Custom Code form not saving changes is most likely caused by ModSecurity installed on your web host.  Click the Encrypt Custom Code button before clicking the Save Root Custom Code button to bypass/evade ModSecurity.  The File Editor PHP error is probably also be caused by ModSecurity.  Remove any files and file paths that you have saved in the P-Security > File Manager.  If I have time in BPS Pro 15.3 I will add encrypt buttons to bypass/evade ModSecurity for the File Editor and File Manager features.

    ModSecurity breaks many things in 1000’s of WordPress Plugins and Themes > https://forum.ait-pro.com/forums/topic/mod-security-common-known-problems/

    #40044
    Walter Tengler
    Participant

    Thank you. Just found that it was another problem.

    I was on PHP8. When going to 7.4 all went fine.

    Walter

    #40045
    AITpro Admin
    Keymaster

    I doubt very seriously that anything in BPS Pro will not work normally/correctly on PHP8. So most likely the PHP8 build/installation that your web host is using is fubar/bad. What I expect is that I will find some nick nack things in BPS Pro during PHP8 testing that need to be changed/modified for PHP8, but everything should work the same in PHP8. I have not tested BPS Pro with PHP8 yet.  PHP8 testing is scheduled in a couple of weeks. I’m surprised your web host offers PHP8 since it was released on November 26, 2020 (2.5 months ago).

    #40049
    Walter Tengler
    Participant

    If it could be helpful I would send you the php error log.

    lemmino

    walter

    #40050
    AITpro Admin
    Keymaster

    Nope, don’t bother with that. I first need to know that the PHP8 build/installation is good before looking at any logs. I have PHP8 installed correctly and ready for testing on my development server.  Will be a couple of weeks before I get around to testing PHP8 with BPS Pro.

    I did do a general quickie test with BPS Pro and PHP8 and did see a couple of minor php errors, but Custom Code worked fine.  The P-Security > File Manager and File Editor also worked fine.  So yeah most likely the PHP8 build/installation on your web host server is fubar/bad.  In order to officially state that BPS Pro is 100% compatible with PHP8 requires about 15-20 hours of extensive testing.  So since I don’t have the time to do extensive testing right now then extensive testing will be done after BPS Pro 15.3 is released.

    #40058
    AITpro Admin
    Keymaster

    I decided to take care of the php errors in PHP 8.0.2 in BPS Pro 15.3.  PHP 7 did more restrictive technicality code checking and PHP 8 continued that more restrictive technicality code checking.  So yeah there are quite a few more technicality php errors that need to be “fixed” in BPS Pro.  Note:  BPS Pro works fine on PHP 8.  As stated the php errors are code correctness technicalities. Probably the more correct wording is “stricter” vs “restrictive”. 😉

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.