Project

General

Profile

Revision b0dc3a2e

Added by Julien Enselme over 7 years ago

Update to Drupal 7.52

View differences:

drupal7/modules/dblog/dblog.module
147 147
  if (!function_exists('drupal_substr')) {
148 148
    require_once DRUPAL_ROOT . '/includes/unicode.inc';
149 149
  }
150
  Database::getConnection('default', 'default')->insert('watchdog')
151
    ->fields(array(
152
      'uid' => $log_entry['uid'],
153
      'type' => drupal_substr($log_entry['type'], 0, 64),
154
      'message' => $log_entry['message'],
155
      'variables' => serialize($log_entry['variables']),
156
      'severity' => $log_entry['severity'],
157
      'link' => drupal_substr($log_entry['link'], 0, 255),
158
      'location' => $log_entry['request_uri'],
159
      'referer' => $log_entry['referer'],
160
      'hostname' => drupal_substr($log_entry['ip'], 0, 128),
161
      'timestamp' => $log_entry['timestamp'],
162
    ))
163
    ->execute();
150
  try {
151
    Database::getConnection('default', 'default')->insert('watchdog')
152
      ->fields(array(
153
        'uid' => $log_entry['uid'],
154
        'type' => drupal_substr($log_entry['type'], 0, 64),
155
        'message' => $log_entry['message'],
156
        'variables' => serialize($log_entry['variables']),
157
        'severity' => $log_entry['severity'],
158
        'link' => drupal_substr($log_entry['link'], 0, 255),
159
        'location' => $log_entry['request_uri'],
160
        'referer' => $log_entry['referer'],
161
        'hostname' => drupal_substr($log_entry['ip'], 0, 128),
162
        'timestamp' => $log_entry['timestamp'],
163
      ))
164
      ->execute();
165
  }
166
  catch (Exception $e) {
167
    // Exception is ignored so that watchdog does not break pages during the
168
    // installation process or is not able to create the watchdog table during
169
    // installation.
170
  }
164 171
}
165 172

  
166 173
/**

Also available in: Unified diff