Commit be689dc4 authored by Dries's avatar Dries

- Patch #1067662 by mfb: optimize file_uri_scheme().

parent 77815159
......@@ -202,9 +202,8 @@ function file_stream_wrapper_get_class($scheme) {
* @see file_uri_target()
*/
function file_uri_scheme($uri) {
$data = explode('://', $uri, 2);
return count($data) == 2 ? $data[0] : FALSE;
$position = strpos($uri, '://');
return $position ? substr($uri, 0, $position) : FALSE;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment