Reverted of changes in 1704, see ticket #160
[mailer.git] / inc / config-functions.php
index a7897e2abcc21a5eb4cca5054611c8c222d30987..bc3eea007071a28706792fa977eac94d557114af 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -294,8 +295,11 @@ function updateConfiguration ($entries, $values, $updateMode='', $config = '0')
                                // Update entry
                                $all .= sprintf("`%s`=`%s`%s%s,", $entry, $entry, $updateMode, (float)$values[$idx]);
                        } else {
-                               // Check if string or number
-                               if (($values[$idx] + 0) === $values[$idx]) {
+                               // Check if string or number but no array
+                               if (is_array($values[$idx])) {
+                                       // Arrays must be fixed...
+                                       debug_report_bug('values[' . $idx . '] should not be an array! Content=<pre>'.print_r($values[$idx], true).'</pre>');
+                               } elseif (($values[$idx] + 0) === $values[$idx]) {
                                        // Number detected
                                        $all .= sprintf("`%s`=%s,", $entry, (float)$values[$idx]);
 
@@ -346,10 +350,10 @@ function updateConfiguration ($entries, $values, $updateMode='', $config = '0')
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries}");
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=%s LIMIT 1",
                        array(bigintval($config)), __FUNCTION__, __LINE__);
-       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):entries={$entries},affectedRows={$affectedRows}<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries},affectedRows={$affectedRows}<br />");
 
        // Rebuild cache
-       rebuildCacheFile('config', 'config');
+       rebuildCache('config', 'config');
 }
 
 // Filter for loading configuration