From 1252842da7852d7dff16924a6b207663a57949cc Mon Sep 17 00:00:00 2001 From: Nozomi Anzai Date: Wed, 25 May 2016 17:04:39 +0900 Subject: [PATCH] Fix readConfigParams() to treat the varliables with numbers See bug 201 --- common.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index 08b3eb6..955924a 100644 --- a/common.php +++ b/common.php @@ -19,7 +19,7 @@ * is" without express or implied warranty. * * @author Ryuma Ando - * @copyright 2003-2015 PgPool Global Development Group + * @copyright 2003-2016 PgPool Global Development Group * @version SVN: $Id$ */ @@ -340,8 +340,17 @@ function readConfigParams($paramList = array()) list($key, $value) = explode('=', $line); $key = trim($key); - $num = preg_replace('/[^0-9]/', NULL, $key); - $key_wo_num = str_replace($num, NULL, $key); + switch ($key) { + case 'recovery_1st_stage_command': + case 'recovery_2nd_stage_command': + $key_wo_num = $key; + break; + + default: + $num = preg_replace('/[^0-9]/', NULL, $key); + $key_wo_num = str_replace($num, NULL, $key); + break; + } // Ignore params not specified to read if ($paramList && is_array($paramList) && ! in_array($key_wo_num, $paramList)) { -- 2.39.5