original_string: public function dispose() {
          // We shouldn't have any temp table registered at the end of the script.
          // So we error_log that and, at the same time, drop all the pending temptables
          if ($temptables = $this->get_temptables()) {
              error_log('Potential coding error - existing temptables found when disposing database. Must be dropped!');
              foreach ($temptables as $temptable) {
                   $this->mdb->get_manager()->drop_table(new xmldb_table($temptable));
              }
          }
          $this->mdb = null;
      }
code: public function dispose() {
          // We shouldn't have any temp table registered at the end of the script.
          // So we error_log that and, at the same time, drop all the pending temptables
          if ($temptables = $this->get_temptables()) {
              error_log('Potential coding error - existing temptables found when disposing database. Must be dropped!');
              foreach ($temptables as $temptable) {
                   $this->mdb->get_manager()->drop_table(new xmldb_table($temptable));
              }
          }
          $this->mdb = null;
      }
code_tokens: public function dispose ( ) { // We shouldn't have any temp table registered at the end of the script. // So we error_log that and, at the same time, drop all the pending temptables if ( $ temptables = $ this -> get_temptables ( ) ) { error_log ( 'Potential coding error - existing temptables found when disposing database. Must be dropped!' ) ; foreach ( $ temptables as $ temptable ) { $ this -> mdb -> get_manager ( ) -> drop_table ( new xmldb_table ( $ temptable ) ) ; } } $ this -> mdb = null ; }
docstring: Dispose the temptables stuff, checking for wrong situations, informing and recovering from them
docstring_tokens: Dispose the temptables stuff checking for wrong situations informing and recovering from them