diff --git a/includes/locale.inc b/includes/locale.inc
index c168da0..46a3293 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -1484,6 +1484,12 @@ function _locale_parse_js_file($filepath) {
   // actual file.
   $parsed_url = drupal_parse_url($filepath);
   $filepath = $parsed_url['path'];
+
+  // Make sure the file actually exists.
+  if (!file_exists($filepath)) {
+    return;
+  }
+
   // Load the JavaScript file.
   $file = file_get_contents($filepath);
 
