summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/file.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 4f7a4c3be..9fbd5572e 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -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;
}
/**