Jump to content

Need exception handling for content search


Recommended Posts

In the file system/Content/Search/Mysql/Index.php:

	public function index( \IPS\Content\Searchable $object )
		/* Get the index data */
		$indexData = $this->indexData( $object );

An OutOfRangeException can be thrown since the search index may be corrupt due to tasks timing out and such, this is a problem for large forums several GB in size.

Since the code below checks if the variable is not null anyway a fix is easy as changing that last line to:

		try {
			$indexData = $this->indexData( $object );
		} catch (\OutOfRangeException $e) {
			$indexData = null;


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...