From the docs:
On seriously malformed URLs, parse_url may return false and emit a E_WARNING
We're already checking for false, but we can get spammed with E_WARNING..
Change-Id: I44a9ef2b163e64113bd2a30b081c1256ffeada1e
if ( !preg_match( '!^https?://!', $url ) ) {
$url = 'http://unused' . $url;
}
+ wfSuppressWarnings();
$a = parse_url( $url );
+ wfRestoreWarnings();
if( $a ) {
$path = isset( $a['path'] ) ? $a['path'] : '';