From: pengbo Date: Mon, 4 Sep 2017 09:14:03 +0000 (+0900) Subject: Fix some notice in setting pgpool.conf. X-Git-Tag: V3_6_2~2 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=8adca295444ada177fa51e2a816d70120f87fec6;p=pgpooladmin.git Fix some notice in setting pgpool.conf. --- 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'}