Beispiel #1
0
 /**
  * Returns the localized error message of the last error.
  * @param Website|Text $websiteOrText The Website object or Text object.
  * @return string The localized error message
  */
 public static function getLastError($websiteOrText)
 {
     if (Validate::$replaceInLastError === "") {
         $message = $websiteOrText->t("errors." . Validate::$lastError);
     } else {
         $message = $websiteOrText->tReplaced("errors." . Validate::$lastError, Validate::$replaceInLastError);
     }
     Validate::$lastError = "";
     Validate::$replaceInLastError = "";
     return $message;
 }