diff --git a/src/Service/Search/ExternalResourceFactory.php b/src/Service/Search/ExternalResourceFactory.php index 0ad9885..4b0eb75 100644 --- a/src/Service/Search/ExternalResourceFactory.php +++ b/src/Service/Search/ExternalResourceFactory.php @@ -65,7 +65,7 @@ private function getField( string $name, string $default = '' ): string { - $value = $document->getFields()[$name]; + $value = $document->getFields()[$name] ?? null; if ($value === null) { return $default; } diff --git a/test/Console/Command/IndexerTest.php b/test/Console/Command/IndexerTest.php index 6323846..0e04944 100644 --- a/test/Console/Command/IndexerTest.php +++ b/test/Console/Command/IndexerTest.php @@ -142,20 +142,15 @@ public function testExecuteWithoutIndexer(): void // the output of the command in the console $output = $commandTester->getDisplay(); - // phpcs:disable $this->assertEquals( <<