public static function ajax_dump() { $error_messages = Hint::get(Hint::ERROR); if (count($error_messages) > 0) { Hint::delete(Hint::ERROR); } else { Hint::delete(Hint::SUCCESS); } }