/** * @inheritdoc */ public function checkError($msg = '', $dieOnError = false) { $result = parent::checkError($msg, $dieOnError); if ($result) { $this->disconnect(); } return $result; }