Browse Source

more null checks

d9_islandora
elizoller 4 years ago
parent
commit
1ab05e79b6
  1. 2
      src/EventGenerator/EventGenerator.php
  2. 4
      src/Form/IslandoraSettingsForm.php

2
src/EventGenerator/EventGenerator.php

@ -92,7 +92,7 @@ class EventGenerator implements EventGeneratorInterface {
];
$flysystem_config = Settings::get('flysystem');
if (array_key_exists('fedora', $flysystem_config)) {
if ($flysystem_config != NULL && array_key_exists('fedora', $flysystem_config)) {
$fedora_url = $flysystem_config['fedora']['config']['root'];
$event["target"] = $fedora_url;
}

4
src/Form/IslandoraSettingsForm.php

@ -155,7 +155,9 @@ class IslandoraSettingsForm extends ConfigFormBase {
];
$flysystem_config = Settings::get('flysystem');
$fedora_url = $flysystem_config['fedora']['config']['root'];
if ($flysystem_config != NULL) {
$fedora_url = $flysystem_config['fedora']['config']['root'];
}
$form[self::FEDORA_URL] = [
'#type' => 'textfield',

Loading…
Cancel
Save