]> git.mxchange.org Git - mailer.git/blobdiff - inc/config-functions.php
Fix for registration, logic went wrong...
[mailer.git] / inc / config-functions.php
index a7897e2abcc21a5eb4cca5054611c8c222d30987..656501db5dfb622dc588bc129619bb5e0c825919 100644 (file)
@@ -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