MDL-21579 using simple exception handling instead of table_exists - we do this in several other places already

This commit is contained in:
Petr Skoda
2010-04-30 15:38:58 +00:00
parent 83bbafaa18
commit 38549d6396
+3 -1
View File
@@ -154,8 +154,10 @@ abstract class session_stub implements moodle_session {
public function terminate_current() {
global $CFG, $SESSION, $USER, $DB;
if ($DB->get_manager()->table_exists('external_tokens')) {
try {
$DB->delete_records('external_tokens', array('sid'=>session_id(), 'tokentype'=>EXTERNAL_TOKEN_EMBEDDED));
} catch (Exception $ignored) {
// probably install/upgrade - ignore this problem
}
if (NO_MOODLE_COOKIES) {