When a judgment is arrested or an indictment quashed on account of any defects therein, because it was not found by a grand jury regularly organized, because it charged no offense or for any other cause, the court may order another indictment to be preferred for the offense charged or intended to be charged, and in such case, an entry of record must be made setting forth the facts.
Ala. Code § 15-8-131 (1975)