Test for defined index

Change-Id: Ic38ef180e06de9658aa800ef193fa93fb58f9ddf
diff --git a/html/process_project_source_locations.php b/html/process_project_source_locations.php
index 12ec46b..118a8b7 100644
--- a/html/process_project_source_locations.php
+++ b/html/process_project_source_locations.php
@@ -147,7 +147,7 @@
     }
 
     if (!$match) {
-      if ($file_id > 0 && $files[$file_id] != null) {
+      if ($file_id > 0 && array_key_exists($file_id, $files) && $files[$file_id] != null) {
         # Existing file
         $file = $files[$file_id];
         $file->is_active = 1;