From 8adca295444ada177fa51e2a816d70120f87fec6 Mon Sep 17 00:00:00 2001 From: pengbo Date: Mon, 4 Sep 2017 18:14:03 +0900 Subject: [PATCH] Fix some notice in setting pgpool.conf. --- pgconfig.php | 3 +++ templates/pgconfig.tpl | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pgconfig.php b/pgconfig.php index bc4233a..1ce0ea2 100644 --- a/pgconfig.php +++ b/pgconfig.php @@ -442,6 +442,9 @@ function writeConfigFile($configValue, $pgpoolConfigParamAll) $param_names = getMultiParams(); foreach ($param_names as $group => $key_arr) { + if (! isset($configValue[$key_arr[0]])) { + continue; + } for ($i = 0; $i < count($configValue[$key_arr[0]]); $i++) { foreach ($key_arr as $key) { $value = (isset($configValue[$key][$i])) ? $configValue[$key][$i] : NULL; diff --git a/templates/pgconfig.tpl b/templates/pgconfig.tpl index 3a60b34..5424da0 100644 --- a/templates/pgconfig.tpl +++ b/templates/pgconfig.tpl @@ -93,6 +93,8 @@ {* --------------------------------------------------------------------- *} {custom_tr_pgconfig param='enable_pool_hba'} + + {if paramExists('pool_passwd')} {custom_tr_pgconfig param='pool_passwd'} {/if} @@ -108,7 +110,7 @@ {custom_tr_pgconfig param='ssl'} - + {custom_tr_pgconfig param='ssl_key'} {custom_tr_pgconfig param='ssl_cert'} {custom_tr_pgconfig param='ssl_ca_cert'} -- 2.39.5