David Hancock
Forum Replies Created
-
Yeah either ternary operator or basic if condition will do, could you add it to the plugin in the next update please? 🙂
My bad, I’ve figured out that the problem is nothing to do with permissions.
The problem is actually caused because on line 29 of main.php the script tries to access a directory (such as .git) using
file_get_contents()and as it’s not a file, a warning is thrown.I propose the following change:
if ( is_dir($filename) ) { $other[$filename] = NULL; } else { $other[$filename] = file_get_contents( $filename ); }instead of:
$other[$filename] = file_get_contents( $filename );That way the warnings will no longer occur but directories like .git will still be caught by the following checks such as
WARNING: .git .gitignore .ds_store Hidden Files or Folders found..Yeah I understand that, I felt dirty just typing it lol. It’s just when you get a page like this.
It starts getting a little annoying having to scroll a bajillion lines to get to the good stuff. I use git in my workflow it’d be nice if it didn’t throw up all over the page when it comes across a directory it can’t access.
Thanks 😉