Title: Minor PHP Error
Last modified: August 31, 2016

---

# Minor PHP Error

 *  Resolved [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/minor-php-error/)
 * While using the plugin Query Monitor for some debugging, we got the following
   error from _wp-content/plugins/sucuri-scanner/sucuri.php:8616_:
 *     ```
       file_get_contents(/XXXXXX/wp-content/.htaccess): failed to open stream: No such file or directory
       ```
   
 * Call stack:
 *     ```
       file_get_contents()
        wp-content/plugins/sucuri-scanner/sucuri.php:8616
       SucuriScanHardening::get_whitelisted()
        wp-content/plugins/sucuri-scanner/sucuri.php:8727
       sucuriscan_hardening_whitelist()
        wp-content/plugins/sucuri-scanner/sucuri.php:8640
       sucuriscan_hardening_page()
        wp-includes/plugin.php:525
       do_action('sucuri-security_page_sucuriscan_hardening')
        wp-admin/admin.php:236
       ```
   
 * Looks like you just forgot to use `file_exists()` to check if the file is there
   before using `file_get_contents()`.
 * I see that you used `file_exists()` in the previous function ( `dewhitelist()`)
   a few lines before it, so I’m guessing that was just an oversight.
 * Site is on PHP 7.0.4 and WP 4.5, Apache.
 * I know some developers get in the habit of just ignoring/suppressing PHP notices
   or throwing an `@` in front of things, but that’s not the best practice. It’s
   better just to be strict and fix the issue outright for cleaner code and to prevent
   any potential further issues (however small). Little things can add up.
 * Thanks in advance. It’s a great plugin. 🙂
 * [https://wordpress.org/plugins/sucuri-scanner/](https://wordpress.org/plugins/sucuri-scanner/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [yorman](https://wordpress.org/support/users/yorman/)
 * (@yorman)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/minor-php-error/#post-7312981)
 * Thanks for the suggestion, I agree with you.
 * I finished this task with commit [1] part of Pull-Request #7 [2]. Once the changes
   submitted to the master repository are reviewed and approved they will be sent
   to the WordPress repository and we will release a new version of the plugin. 
   In the meantime you can install the unstable version of the code from here [3].
 * [1] [https://github.com/cixtor/sucuri-wordpress-plugin/commit/3756977](https://github.com/cixtor/sucuri-wordpress-plugin/commit/3756977)
   [
   2] [https://github.com/Sucuri/sucuri-wordpress-plugin/pull/7](https://github.com/Sucuri/sucuri-wordpress-plugin/pull/7)[
   3] [https://github.com/cixtor/sucuri-wordpress-plugin/archive/master.zip](https://github.com/cixtor/sucuri-wordpress-plugin/archive/master.zip)
 *  Thread Starter [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/minor-php-error/#post-7312982)
 * Thanks for the quick fix! Keep up the great work. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Minor PHP Error’ is closed to new replies.

 * ![](https://ps.w.org/sucuri-scanner/assets/icon-256x256.png?rev=2875755)
 * [Sucuri Security - Auditing, Malware Scanner and Security Hardening](https://wordpress.org/plugins/sucuri-scanner/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sucuri-scanner/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sucuri-scanner/)
 * [Active Topics](https://wordpress.org/support/plugin/sucuri-scanner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sucuri-scanner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sucuri-scanner/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [redsand](https://wordpress.org/support/users/redsand/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/minor-php-error/#post-7312982)
 * Status: resolved