[Plugin: Theme-Check] file_get_contents warning with .git directories
-
I get the following warning about a hundred times down the page every time I run a theme check:
Warning: file_get_contents(D:\www\webroot\work\wordpress.dev/wp-content/themes/theme\.git): failed to open stream: Permission denied in D:\www\webroot\work\wordpress.dev\wp-content\plugins\theme-check\main.php on line 29
I understand this to be file permissions that Windows has set on the .git directories. I was just wondering if you would add a simple fix to the main.php file?
I propose the following change on line 29 of main.php:
$other[$filename] = @file_get_contents( $filename );
instead of:
$other[$filename] = file_get_contents( $filename );
to suppress the warnings. Of course that is a simple fix, feel free to do your own proper exception checking with a try/catch routine.
Would make me super happy to not have to see these warnings again ??
Thanks.
- The topic ‘[Plugin: Theme-Check] file_get_contents warning with .git directories’ is closed to new replies.