Jump to content

Need exception handling for content search


Parisian

Recommended Posts

Posted

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;
		}

 

Posted

indexData() should not be throwing an OutOfRangeException on the surface. If you are experiencing this, I would recommend submitting a ticket so we can take a closer look at what is happening.

Archived

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

  • Recently Browsing   0 members

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