From 0da4f641d0a68c04fedf37da35bd72a94a962301 Mon Sep 17 00:00:00 2001 From: hugome Date: Tue, 25 Apr 2017 02:07:21 +0200 Subject: [PATCH] Fix null exception in api --- .../controllers/OPNsense/AcmeClient/Api/SettingsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/SettingsController.php b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/SettingsController.php index 52e60e9b7..bdf55143c 100644 --- a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/SettingsController.php +++ b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/SettingsController.php @@ -333,7 +333,7 @@ class SettingsController extends ApiMutableModelControllerBase //$this->getLogger()->error("LE HAProxy DEBUG: checking frontend: ${_frontend}"); $frontend = $mdlHAProxy->getByFrontendID($_frontend); // Make sure the frontend was found in config. - if (!empty((string)$frontend->id)) { + if (!is_null($frontend) && !empty((string)$frontend->id)) { // Check if the HAProxy ACME Action is linked to this frontend. $_actions = $frontend->linkedActions; if (strpos($_actions, $action_ref) !== false) {