diff --git includes/file.inc includes/file.inc
index 4f43ae3..731ca12 100644
--- includes/file.inc
+++ includes/file.inc
@@ -654,10 +654,11 @@ function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXIST
     $destination = file_build_uri(basename($source));
   }
 
-  // Assert that the destination contains a valid stream.
+  // Assert that the destination contains an allowed scheme.
   $destination_scheme = file_uri_scheme($destination);
   if (!$destination_scheme || !file_stream_wrapper_valid_scheme($destination_scheme)) {
     drupal_set_message(t('The specified file %file could not be copied, because the destination %destination is invalid. This is often caused by improper use of file_unmanaged_copy() or a missing stream wrapper.', array('%file' => $original_source, '%destination' => $destination)), 'error');
+    return FALSE;
   }
 
   // Prepare the destination directory.
