
7 Cal.App.2d 61 (1935)
E. S. STEWART, Respondent,
v.
THE JUSTICE'S COURT OF LINDSAY TOWNSHIP et al., Appellants.
Civ. No. 1275. 
California Court of Appeals. Fourth Appellate District.  
May 17, 1935.
 James R. McBride for Appellants.
 Ward G. Rush for Respondent.
 Barnard, P. J.
 On April 20, 1933, one Baker brought an action against these petitioners in the respondent Justice's Court and secured a writ of attachment by delivering to the Justice of the Peace his own personal check for $50 in lieu of a written undertaking. A motion to discharge this writ, on the ground that no sufficient undertaking had been filed, was denied on May 13, 1933, the respondent justice having theretofore cashed the check. On May 25, 1933, upon the stipulation of the petitioners, judgment was entered against them. On that day notice was given of another motion to discharge the attachment on the same ground as before, which motion was denied on May 31, 1933. On June 2, 1933, the petitioners filed in the Superior Court of Tulare County a petition for a writ of mandate compelling the respondent justice to enter an order discharging the attachment. In due course, judgment was entered ordering that such a writ of mandate issue, and from this judgment this appeal was taken.
 The sole question presented is whether the delivery of a check for $50 to a justice of the peace, which was subsequently cashed by the justice, constituted a sufficient undertaking or *63 security for the issuance of a writ of attachment under the statutes which were then in force.
 Section 867 of the Code of Civil Procedure then provided that before issuing such a writ the justice must require a written undertaking with two or more sufficient sureties in a sum not less than $50. Section 926 of that code then provided that in all civil cases in a justice's court, where an undertaking was required, an equal sum of money in United States gold coin might be deposited with the justice and should be taken as security in place of the undertaking.
 The purpose of these statutes was to furnish security in a given amount to a party whose property was to be attached. Illustrating and carrying out this purpose, and to prevent the discharge of an attachment because of a mere technical insufficiency in the undertaking, section 558 of that code provides that upon an application for the discharge of such a writ, as improperly or irregularly issued, the same shall not be discharged if at or before the hearing of the application the undertaking in question is amended so as to conform to the requirements.
 [1] In the instant case no attempt was made to furnish the written undertaking provided for in section 867. An attempt was made, however, under section 926, to deposit the cash in lieu of a written undertaking. It must be conceded that the latter statute was not strictly complied with, in that gold coin was not deposited with the court and in that no cash or money of any kind was in the hands of the justice before the writ of attachment was issued. The question remains whether such an attempt to deposit money as such security is a nullity, or whether it constitutes a sufficient compliance with the statute, any irregularity being cured by the subsequent cashing of the check.
 Petitioners make no point of the fact that gold coin was not deposited but base their contention solely on the fact that no lawful money was in the hands of the justice before the writ was issued. Nor do we think an objection based upon the failure to deposit gold coin was available to them. By executive orders issued by the President of the United States on March 9, 1933, and April 5, 1933, based upon an act of Congress passed on March 9, 1933, the use of gold coin for such purpose was prohibited and made impossible. (See *64 Norman v. Baltimore O. & R. Co., 294 U.S. 240 [55 S.Ct. 407, 79 L.Ed. 885, 95 A.L.R. 1352].)
 [2] An attempt was here made to provide security for the petitioners by a deposit of money in lieu of a written undertaking. In view of the holding of the United States Supreme Court, we think it must be held that a deposit of lawful money at that time would have been a sufficient compliance with the statute. While a check is not lawful money, it is a commonly accepted method of transferring money. This check was an order on the bank for the money and was paid on presentation. The justice could have cashed the check before issuing the attachment and his neglect to do so should not be charged to the plaintiff in the action. While such a failure on the part of the justice constituted an irregularity which would continue until the check was cashed, when this occurred the money was in the hands of the court as contemplated by section 926, in so far as it was in the power of any litigant to comply with that section after the passing of the act of Congress and the issuance of the executive orders above referred to. Thereafter, with the money in the hands of the court, the petitioners had better security than they would have had under any written agreement to pay a similar sum in the same kind of money.
 [3] Conceding that attachment proceedings are statutory and that the statutes must be complied with, the essential purpose of this statute, the furnishing of such security, should not be lost sight of. This was accomplished here and the giving of a check which was cashed was not a mere nullity. When the discharge of the attachment was asked for, any irregularity that had existed had been corrected and the justice knew that the check he held before issuing the writ was good, that as a matter of fact it was and had proved to be the equivalent of cash, and that he then had the actual money in his possession. While section 558 relates to written undertakings, and not to a deposit of cash in lieu thereof, it discloses an intention to prevent the discharge of an attachment on a mere technical insufficiency in the undertaking which has been corrected before the discharge is asked for. We think a court should and does have the inherent power to carry out the real intent of the statutes and to refuse to discharge an attachment where such an irregularity as here appears has been fully corrected and the money is in the *65 hands of the court. Any other holding would give to the statute not merely a strict but an unreasonable construction. In our opinion there was a substantial and sufficient compliance with this statute and the petitioners were not entitled to a discharge of the attachment at the times the motions therefor were made.
 For the reasons given the judgment is reversed.
 Marks, J., and Jennings, J., concurred.
