Update vote.class.php

Fix bug with vote creation for a new thread