From 66100f67d7c8c0d0dcddcb4779f4feb2f4d79e3e Mon Sep 17 00:00:00 2001 From: Alain ICHE Date: Sun, 29 Jul 2012 08:05:04 +0530 Subject: [PATCH 1/2] bug #3541966 [config] Error in generated configuration array --- ChangeLog | 1 + setup/lib/ConfigGenerator.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 49425144f7..237060b1a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ phpMyAdmin - ChangeLog - bug #3549084 [edit] Can't enter date directly when editing inline - bug #3548491 [interface] Inline query editor doesn't work from search results - bug #3547825 [edit] BLOB download no longer works +- bug #3541966 [config] Error in generated configuration arrray 3.5.2.0 (2012-07-07) - bug #3521416 [interface] JS error when editing index diff --git a/setup/lib/ConfigGenerator.class.php b/setup/lib/ConfigGenerator.class.php index b4b49fe219..8a11d2bf3d 100644 --- a/setup/lib/ConfigGenerator.class.php +++ b/setup/lib/ConfigGenerator.class.php @@ -141,7 +141,7 @@ class ConfigGenerator // more than 4 values - value per line $imax = count($retv)-1; for ($i = 0; $i <= $imax; $i++) { - $ret .= ($i < $imax ? ($i > 0 ? ',' : '') : '') . $crlf . ' ' . $retv[$i]; + $ret .= ($i > 0 ? ',' : '') . $crlf . ' ' . $retv[$i]; } } $ret .= ')'; From 72cdb4d05861ef90c1201c10b9590c29cb01db29 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Sun, 29 Jul 2012 08:10:25 +0530 Subject: [PATCH 2/2] Simplify the logic a bit --- setup/lib/ConfigGenerator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/lib/ConfigGenerator.class.php b/setup/lib/ConfigGenerator.class.php index 373c10727e..8dc359bb7c 100644 --- a/setup/lib/ConfigGenerator.class.php +++ b/setup/lib/ConfigGenerator.class.php @@ -142,8 +142,8 @@ class ConfigGenerator $ret .= implode(', ', $retv); } else { // more than 4 values - value per line - $imax = count($retv)-1; - for ($i = 0; $i <= $imax; $i++) { + $imax = count($retv); + for ($i = 0; $i < $imax; $i++) { $ret .= ($i > 0 ? ',' : '') . $crlf . ' ' . $retv[$i]; } }