In all prosecutions for violations of the ordinances of the city, commenced by any person other than an officer of the city, the court may require the prosecutor to file security for the payment of the costs of the proceedings, in case the defendant is acquitted. But he shall not be liable for the payment of the costs if the magistrate before whom the complaint is made, or trial is had, shall certify in his minutes that there was probable cause for the making of such complaint.
MCL 90.18