* (bug 26811) When a DBUnexpectedError occurs, DB server hostnames are now
hidden unless $wgShowExceptionDetails is true, and $wgShowDBErrorBacktrace
no longer applies in such cases.
+* (bug 60960) Avoid doing file_exist() checks on data: URIs, as they cause
+ warnings to be printed on Windows due to large path length.
=== Web API changes in 1.23 ===
* (bug 54884) action=parse&prop=categories now indicates hidden and missing
$rFlags = PREG_OFFSET_CAPTURE | PREG_SET_ORDER;
if ( preg_match_all( '/' . self::URL_REGEX . '/', $source, $matches, $rFlags ) ) {
foreach ( $matches as $match ) {
- $file = $path . $match['file'][0];
- // Only proceed if we can access the file
+ $url = $match['file'][0];
+
+ // Skip fully-qualified and protocol-relative URLs and data URIs
+ if ( substr( $url, 0, 2 ) === '//' || parse_url( $url, PHP_URL_SCHEME ) ) {
+ break;
+ }
+
+ $file = $path . $url;
+ // Skip non-existent files
if ( file_exists( $file ) ) {
- $files[] = $file;
+ break;
}
+
+ $files[] = $file;
}
}
return $files;
$url = $file . $query;
// Skip fully-qualified and protocol-relative URLs and data URIs
- $urlScheme = substr( $url, 0, 2 ) === '//' || parse_url( $url, PHP_URL_SCHEME );
- if ( $urlScheme ) {
+ if ( substr( $url, 0, 2 ) === '//' || parse_url( $url, PHP_URL_SCHEME ) ) {
return $url;
}