mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Fix crash on ACME automations (#3752)
This commit is contained in:
+8
-4
@@ -598,10 +598,14 @@ class LeCertificate extends LeCommon
|
||||
foreach ($automations as $auto_uuid) {
|
||||
$autoFactory = new LeAutomationFactory();
|
||||
$automation = $autoFactory->getAutomation($auto_uuid);
|
||||
$automation->init($this->getId(), (string)$this->config->name, (string)$this->config->account, $this->cert_ecc);
|
||||
// Ignore invalid automations.
|
||||
if ($automation->prepare()) {
|
||||
$automation->run();
|
||||
// Skip invalid automations.
|
||||
if (!is_null($automation)) {
|
||||
$automation->init($this->getId(), (string)$this->config->name, (string)$this->config->account, $this->cert_ecc);
|
||||
if ($automation->prepare()) {
|
||||
$automation->run();
|
||||
}
|
||||
} else {
|
||||
LeUtils::log_error("ignoring invalid automation: ${auto_uuid}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user