mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-25 15:36:12 +01:00
TASK: Cleanup code
Use get and use an try catch. Receiving null through ifExists will result in an php error.
This commit is contained in:
parent
7722c37ea5
commit
334bb34625
1 changed files with 16 additions and 11 deletions
|
@ -21,6 +21,7 @@ namespace Codappix\SearchCore\Domain\Index;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
|
||||||
|
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
||||||
use Codappix\SearchCore\Connection\ConnectionInterface;
|
use Codappix\SearchCore\Connection\ConnectionInterface;
|
||||||
use \TYPO3\CMS\Core\Utility\GeneralUtility;
|
use \TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
|
||||||
|
@ -125,9 +126,10 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
{
|
{
|
||||||
$record['search_abstract'] = '';
|
$record['search_abstract'] = '';
|
||||||
|
|
||||||
|
try {
|
||||||
$fieldsToUse = GeneralUtility::trimExplode(
|
$fieldsToUse = GeneralUtility::trimExplode(
|
||||||
',',
|
',',
|
||||||
$this->configuration->getIfExists('indexing.' . $this->identifier . '.abstractFields')
|
$this->configuration->get('indexing.' . $this->identifier . '.abstractFields')
|
||||||
);
|
);
|
||||||
if (!$fieldsToUse) {
|
if (!$fieldsToUse) {
|
||||||
return;
|
return;
|
||||||
|
@ -138,6 +140,9 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (InvalidArgumentException $e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue