From 007d0459beb5a1a071e9d400fd43e1aa8552fd2f Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 30 Apr 2019 22:25:38 +0200 Subject: [PATCH] optimize check --- src/Module/Hostxrd.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Module/Hostxrd.php b/src/Module/Hostxrd.php index 75997c86b4..4f95ebb451 100644 --- a/src/Module/Hostxrd.php +++ b/src/Module/Hostxrd.php @@ -30,9 +30,8 @@ class Hostxrd extends BaseModule $config = $app->getConfig(); header("Content-type: text/xml"); - $pubkey = $config->get('system', 'site_pubkey'); - if (!$pubkey) { + if (!$config->get('system', 'site_pubkey', false)) { $res = Crypto::newKeypair(1024); $config->set('system','site_prvkey', $res['prvkey']); -- 2.39.5