Fix file not exist notice possibility in IndexDocumentBundle, a=chris
Fix file not exist notice possibility in IndexDocumentBundle, a=chris
diff --git a/src/library/IndexDocumentBundle.php b/src/library/IndexDocumentBundle.php
index 3b652359c..5c441a721 100644
--- a/src/library/IndexDocumentBundle.php
+++ b/src/library/IndexDocumentBundle.php
@@ -1381,7 +1381,11 @@ class IndexDocumentBundle implements CrawlConstants
if (empty($file_handles[$partition])) {
$postings_filename = $this->getPartitionBaseFolder($partition) .
"/" . IndexDocumentBundle::POSTINGS_FILENAME;
- $fh = fopen($postings_filename , "r");
+ if (file_exists($postings_filename)) {
+ $fh = fopen($postings_filename, "r");
+ } else {
+ return "";
+ }
$file_handles[$partition] = $fh;
} else {
$fh = $file_handles[$partition];