Title: [Bug fix] Unreadable files
Last modified: August 20, 2016

---

# [Bug fix] Unreadable files

 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/bugfix-1/)
 * Hiya,
 * Very useful tool. I found a small bug, please find the fix for it below. Would
   be great if you could incorporate it into the codebase.
 * Find line 796:
 *     ```
       $contents = file( $this->path . $file );
       foreach ( $contents as $n => $line ) {
       ```
   
 * Replace with:
 *     ```
       $contents = is_readable( $this->path . $file ) ? @file( $this->path . $file ) : false;
       if( $contents !== false ) {
       	foreach ( $contents as $n => $line ) {
       ```
   
 * Obviously the newly added `if()` will still need to be closed round line 829 
   and you may want to adjust the indentation of the foreach content 😉
 * Hope this helps!
 * Smile,
    Juliette
 * [http://wordpress.org/extend/plugins/exploit-scanner/](http://wordpress.org/extend/plugins/exploit-scanner/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/bugfix-1/#post-3270404)
 * Hmm… the recent new version (1.3.3) hasn’t yet incorporated this fix….

Viewing 1 replies (of 1 total)

The topic ‘[Bug fix] Unreadable files’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/exploit-scanner.svg)
 * [Exploit Scanner](https://wordpress.org/plugins/exploit-scanner/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/exploit-scanner/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/exploit-scanner/)
 * [Active Topics](https://wordpress.org/support/plugin/exploit-scanner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/exploit-scanner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/exploit-scanner/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/bugfix-1/#post-3270404)
 * Status: not resolved