Skip to content

Commit

Permalink
Merge pull request #150 from benoitvidis/debug-on-index-failure
Browse files Browse the repository at this point in the history
Debug error on indexing failure
  • Loading branch information
andrerom committed Feb 17, 2014
2 parents 0bfbcab + 57e0cd1 commit 1221fc8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/ezsolrbase.php
Expand Up @@ -272,6 +272,7 @@ static function validateUpdateResult ( $updateResult )
{
if ( empty( $updateResult ) )
{
eZDebug::writeError( 'Empty response received from Solr', 'eZ Find' );
return false;
}
$dom = new DOMDocument( '1.0' );
Expand All @@ -280,13 +281,15 @@ static function validateUpdateResult ( $updateResult )

if ( !$status )
{
eZDebug::writeError( 'Invalid XML received from Solr: '.$updateResult, 'eZ Find' );
return false;
}

$intElements = $dom->getElementsByTagName( 'int' );

if ( $intElements->length < 1 )
{
eZDebug::writeError( 'Invalid response from Solr: '.$updateResult, 'eZ Find' );
return false;
}

Expand All @@ -301,6 +304,7 @@ static function validateUpdateResult ( $updateResult )
}
}
}
eZDebug::writeError( 'Invalid response from Solr: '.$updateResult, 'eZ Find' );
return false;
}

Expand Down

0 comments on commit 1221fc8

Please sign in to comment.