Huge patchset (I don't recall all details):
[mailer.git] / inc / config-functions.php
index a7897e2abcc21a5eb4cca5054611c8c222d30987..d10f4fa12d8f199ff71a8c99741b3c4b7155f466 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,7 +349,7 @@ 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');