Plugin Author
Dylan
(@dyland)
This is looking at the URI returned by the browser’s error report and trying to parse out the host name. For some reason the URI is not parseable by PHP (using parse_url). You can ignore this error and I’ll change the error report in a later version to include the URI.
Thanks Dylan
So if that is my only error(s), I should be good to live?
Plugin Author
Dylan
(@dyland)
Yes – should be no problem. It’s probably a visitor using an odd browser that doesn’t report issues properly. You can clear the log and it should stop showing that issue.
It was me testing from Firefox 56.0.2 on my Windows 10 Pro workstation
It happens every time I reload any of the pages
Plugin Author
Dylan
(@dyland)
So you’re running a local WordPress? It’s probably something to do with the URL being logged in error – you can use the Network tab of the browser’s developer tools to see what is being received by the server – it should be a normal URL, if its something else (such as a file system reference) that might cause the URL to not parse properly.
The error is coming from line 431 of wpCSPAdmin.php which is the log page display routine, it should only happen on the log page. The underlying issue is line 324:
parse_url( $obj->blocked_uri ) ;
It either returns false or an array with no “host” field. You can change line 431 to either display the blocked URI (so you can see why its not parsing) or you can enter just after parse_url on line 324:
if ( empty( $URIParts['host'] ) ) { continue ; }
which will cause the system to ignore those lines.
As I can’t recreate, let me know what works best so I put it in the underlying code.
Dylan
-
This reply was modified 8 years, 3 months ago by
Dylan.