Skip to content

Commit

Permalink
OS-115 Skipping address with empty matrikelnummer
Browse files Browse the repository at this point in the history
  • Loading branch information
stankut committed Sep 16, 2024
1 parent 1f4ada5 commit 7e5ddb5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupBase;
use GuzzleHttp\ClientInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use TypeError;

/**
* Defines a plugin for Datafordeler Data.
Expand Down Expand Up @@ -91,7 +92,12 @@ public function getMatrikulaEntries(string $matrikulaId) : array {
if (NestedArray::keyExists($jsonDecoded, ['features', 0, 'properties', 'jordstykke'])) {
$jordstykker = NestedArray::getValue($jsonDecoded, ['features', 0, 'properties', 'jordstykke']);
foreach ($jordstykker as $jordstyk) {
$matrikulaEntries[] = new DatafordelerMatrikula($jordstyk);
try {
$matrikulaEntries[] = new DatafordelerMatrikula($jordstyk);
}
catch (TypeError $e) {
// Could not create matrikula object.
}
}
}
}
Expand Down

0 comments on commit 7e5ddb5

Please sign in to comment.