]> git.mxchange.org Git - mailer.git/blobdiff - inc/config-functions.php
Fix for registration, logic went wrong...
[mailer.git] / inc / config-functions.php
index 609e5c06f99554ad00c053025229ed6c821f5d39..656501db5dfb622dc588bc129619bb5e0c825919 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 02/28/2009 *
- * ===============                              Last change: 02/28/2009 *
+ * Mailer v0.2.1-FINAL                                Start: 02/28/2009 *
+ * ===================                          Last change: 02/28/2009 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : config-functions.php                             *
@@ -294,8 +294,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 +349,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