Global Search block indexing error

Global Search block indexing error

by Darrel Tenter -
Number of replies: 0
Upon first use of the Global Search block I was prompted to generate the index. I did so but got the following error.

Fatal error: Call to a member function MoveNext() on a non-object in ...moodle/search/documents/resource_document.php on line 55

I get the same error if I Run the indexer in the Global Search settings. The content of that file around line 55 is below. 55 is highlighted.
I was told that this is an experimental block, but I was hoping that someone could give me an idea how to fix this.
Thanks,
Darrel


while (!$resources->EOF) {
$resource = $resources->fields;

if ($resource) {
$documents[] = new ResourceSearchDocument($resource);
} //if

$resources->MoveNext();
} //foreach

return $documents;
} //resource_get_content_for_index

Average of ratings: -