protected function checkSavedErrors()
{
if (isset($_SESSION['errors'])) {
// restore saved errors
foreach ($_SESSION['errors'] as $hash => $error) {
if ($error instanceof Error && !isset($this->errors[$hash])) {
$this->errors[$hash] = $error;
}
}
//$this->errors = array_merge($_SESSION['errors'], $this->errors);
// delete stored errors
$_SESSION['errors'] = array();
unset($_SESSION['errors']);
}
}