diff -u b/includes/errors.inc b/includes/errors.inc --- b/includes/errors.inc +++ b/includes/errors.inc @@ -428,17 +428,20 @@ if ($show_non_scalar && $call_depth >= $start_vars_non_scalar && $call_depth <= $stop_vars_non_scalar) { if (!empty($output_buffering)) { ob_start(); - var_dump($arg); // Handles recursion so do it this way if possible. + // Handles recursion so do it this way if possible. + var_dump($arg); $var = ob_get_clean(); } else { - $var = @var_export($arg, TRUE); // '@' = Suppress the "does not handle recursion" warnings. + // '@' = Suppress the "does not handle recursion" warnings. + $var = @var_export($arg, TRUE); } $data .= _format_backtrace_fmt_var($var, $max_len_non_scalar); } } } - $data = strlen($data) ? substr($data, 0, -4) : ' '; // Remove
off end of last var. + // Remove
off end of last var. + $data = strlen($data) ? substr($data, 0, -4) : ' '; $cs .= "$data"; break; @@ -518,7 +521,8 @@ border-top: 1px solid; } .backtrace .var-cell { - border: 1px dotted; width: 30%; + border: 1px dotted; + width: 30%; }; pre.backtrace { font-family: "Andale Mono","Courier New",Courier,Lucidatypewriter,Fixed,monospace; diff -u b/modules/dblog/dblog.module b/modules/dblog/dblog.module --- b/modules/dblog/dblog.module +++ b/modules/dblog/dblog.module @@ -152,19 +152,15 @@ if (!array_has_PDOException($log_entry)) { Database::getConnection('default', 'default')->insert('watchdog') ->fields(array( - 'uid' => $log_entry['uid'], - 'type' => drupal_substr($log_entry['type'], 0, 64), - 'message' => $log_entry['message'], + 'uid' => $log_entry['uid'], + 'type' => drupal_substr($log_entry['type'], 0, 64), + 'message' => $log_entry['message'], 'variables' => serialize($log_entry['variables']), - 'severity' => $log_entry['severity'], - // Do not use substr() on link as it can split a UTF-8 character - // making the string an invalid multibyte string and the record will - // likely be rejected by the database. E.g., the $link variable in - // DrupalWebTestCase->generateLogEntries(). - 'link' => drupal_substr($log_entry['link'], 0, 255), - 'location' => $log_entry['request_uri'], - 'referer' => $log_entry['referer'], - 'hostname' => drupal_substr($log_entry['ip'], 0, 128), + 'severity' => $log_entry['severity'], + 'link' => drupal_substr($log_entry['link'], 0, 255), + 'location' => $log_entry['request_uri'], + 'referer' => $log_entry['referer'], + 'hostname' => drupal_substr($log_entry['ip'], 0, 128), 'timestamp' => $log_entry['timestamp'], )) ->execute();