• Resolved Anantajit JG

    (@anantajitjg)


    The below PHP notices are thrown when WordPress debugging mode is enabled, and the ‘whp_scan_results’ option is not properly set initially. When I click the ‘Start a New Audit’ button, these notices are gone.

    
    [05-Aug-2020 08:47:52 UTC] PHP Notice:  Trying to access array offset on value of type bool in /Applications/MAMP/htdocs/test/wp-content/plugins/wp-security-hardening/modules/functions.php on line 532
    [05-Aug-2020 08:47:52 UTC] PHP Notice:  Trying to access array offset on value of type bool in /Applications/MAMP/htdocs/test/wp-content/plugins/wp-security-hardening/modules/functions.php on line 551
    [05-Aug-2020 08:47:52 UTC] PHP Notice:  Trying to access array offset on value of type bool in /Applications/MAMP/htdocs/test/wp-content/plugins/wp-security-hardening/modules/functions.php on line 572 
    

    Suggestion: Please consider adding is_array check for $value variable or may be to $this->last_results (This can eliminate type casting too).

    Thanks for this simple but awesome plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Notices’ is closed to new replies.