diff --git a/src/TideSystemInfoService.php b/src/TideSystemInfoService.php index 13a42b944..fed2f4fa4 100644 --- a/src/TideSystemInfoService.php +++ b/src/TideSystemInfoService.php @@ -226,10 +226,12 @@ function ($entityType) { */ public function getPackageVersion($packageName) { if (empty($packageName)) { - $result = $this->sensorRunner->runSensors([SensorConfig::load('tide_times')]); - $value = $result[0]->getValue(); - $decodedValue = json_decode($value, TRUE); - return $decodedValue; + if ($this->sensorRunner) { + $result = $this->sensorRunner->runSensors([SensorConfig::load('tide_times')]); + $value = $result[0]->getValue(); + $decodedValue = json_decode($value, TRUE); + return $decodedValue; + } } if (strtolower($packageName) === 'php') { diff --git a/tide_core.services.yml b/tide_core.services.yml index c332995ba..49d7fb1d1 100644 --- a/tide_core.services.yml +++ b/tide_core.services.yml @@ -34,4 +34,4 @@ services: - '@entity_field.manager' - '@logger.factory' - '@file_system' - - '@monitoring.sensor_runner' + - '@?monitoring.sensor_runner'