Habari\Session::has_errors PHP Метод

has_errors() публичный статический Метод

Determine if there are error messages to display
public static has_errors ( string $key = null ) : boolean
$key string Optional key of the unique error message
Результат boolean true if there are errors, false if not
    public static function has_errors($key = null)
    {
        if (isset($key)) {
            return isset($_SESSION['errors']) && isset($_SESSION['errors'][$key]);
        } else {
            return count(self::get_errors(false)) ? true : false;
        }
    }