|
From: <var...@us...> - 2021-08-04 14:25:36
|
Revision: 10431
http://sourceforge.net/p/phpwiki/code/10431
Author: vargenau
Date: 2021-08-04 14:25:33 +0000 (Wed, 04 Aug 2021)
Log Message:
-----------
configurator.php: check default_value is an array
Modified Paths:
--------------
trunk/configurator.php
Modified: trunk/configurator.php
===================================================================
--- trunk/configurator.php 2021-08-04 14:23:13 UTC (rev 10430)
+++ trunk/configurator.php 2021-08-04 14:25:33 UTC (rev 10431)
@@ -2212,8 +2212,12 @@
$n = "";
if ($this->description)
$n = "\n";
- $default_value = key($this->default_value);
- next($this->default_value);
+ if (is_array($this->default_value)) {
+ $default_value = key($this->default_value);
+ next($this->default_value);
+ } else {
+ $default_value = $this->default_value;
+ }
if ($posted_value == $default_value)
return "$n;" . $this->_config_format($posted_value);
elseif ($posted_value == '')
@@ -2233,7 +2237,7 @@
{
function value()
{
- return;
+ return "";
}
function get_config($posted_value)
@@ -2365,13 +2369,10 @@
$timestamp = date('dS \of F, Y H:i:s');
- $config = "
-; This is a local configuration file for PhpWiki.
-; It was automatically generated by the configurator script
-; on the $timestamp.
-;
-; $preamble
-";
+ $config = "; This is a local configuration file for PhpWiki.\n"
+ . "; It was automatically generated by the configurator script\n"
+ . "; on the $timestamp.\n"
+ . $preamble;
$posted = $GLOBALS['HTTP_POST_VARS'];
@@ -2406,7 +2407,7 @@
}
} else {
echo "<p>The configuration file could <b>not</b> be written.<br />\n",
- " You should copy the above configuration to a file, ",
+ "You should copy the above configuration to a file, ",
"and manually save it as <code><b>config/config.ini</b></code>.</p>\n";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|