public function savePreviousErrors() { unset($_SESSION['prev_errors']); $_SESSION['prev_errors'] = $GLOBALS['error_handler']->getCurrentErrors(); }