Fix error when a Select Box has no states on PHP5.3. Closes #1773