Skip to content

Commit 46965b2

Browse files
committed
NOTES FetchingRemoteDataSniff
1 parent d0ee692 commit 46965b2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

WordPressVIPMinimum/Tests/Performance/FetchingRemoteDataUnitTest.inc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,16 @@ $result = file_get_contents(( is_ssl() ? 'http' : 'https' ) . '://example.com');
8686

8787
// Bug: don't presume if the parameter contains a text string token, that will be the only token.
8888
\file_get_contents( $url . '/filename.css' ); // Warning FileGetContentsUnknown.
89+
90+
/*
91+
- Recognize use of set_url_scheme() as remote URL
92+
- Recognize use of filter_ssl() as remote URL
93+
- false positive \file_get_contents( __FILE__ );
94+
- false positive \file_get_contents( dirname(...) );
95+
'ABSPATH',
96+
'WP_CONTENT_DIR',
97+
'WP_PLUGIN_DIR',
98+
99+
=> This sniff should probably take a lot of the "known local file" checks as used in the IncludingFileSniff into account.
100+
101+
*/

0 commit comments

Comments
 (0)