Skip to content
Snippets Groups Projects
Commit af8882e9 authored by Angie Byron's avatar Angie Byron
Browse files

#978050 by swentel: Fixed Clearing the log with a filter throws notice and a PDOException

parent 74e5b8ab
No related branches found
No related tags found
No related merge requests found
......@@ -376,6 +376,7 @@ function dblog_clear_log_form($form) {
* Submit callback: clear database with log messages.
*/
function dblog_clear_log_submit() {
$_SESSION['dblog_overview_filter'] = array();
db_delete('watchdog')->execute();
drupal_set_message(t('Database log cleared.'));
}
......@@ -467,6 +467,10 @@ class DBLogTestCase extends DrupalWebTestCase {
$count = $this->getTypeCount($types);
$this->assertEqual(array_sum($count), $type['count'], 'Count matched');
}
// Clear all logs and make sure the confirmation message is found.
$this->drupalPost('admin/reports/dblog', array(), t('Clear log messages'));
$this->assertText(t('Database log cleared.'), t('Confirmation message found'));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment