Kellam. J.
This was an action upon an undertaking given under Sections 5009, 5010, Comp. Laws, for the discharge of an attachment. After the giving of the undertaking the defendant in attachment moved for its discharge upon traverse of the attachment affidavit, under Section 5011. Upon the hearing of such motion the judge made an order which, after the usual preliminary recitals, reads as follows: “It is hereby ordered that the attachment in said cause be, and the same is hereby, dissolved and set aside; and it is hereby further ordered that the bond of J. Monk, with Wm. J. Hallock as surety be cancelled and declared void.” No appeal was taken from this order, and it was never vacated or reversed. When the undertaking was given, defendant Monk secured his sureties for so signing; and after the entry of the above order, of which plaintiffs had notice, said sureties returned their security to said Monk. The plaintiffs had judgment in the main action against the defendants therein, and, failing to collect the same, brought this action on such undertaking. Upon these facts, concerning which there seems to be no dispute, the court found as conclusions of law “that by reason of the adjudication made by the court in making and executing the order for the discharge of the attachment in the action of Wyman, Mullin & Co. against J. Monk, and by reason of the failure of said plaintiffs in said cause or their assigns, to appeal from said order, or moving to vacate or set aside the same, the plaintiffs herein are barred from maintaining this action,” and entered judgment against the plaintiffs, from which judgment this appeal is taken. The error assigned is that the facts do not justify the conclusion of law.
In McLaughlin v. Wheeler, 1 S. D. 497, 47 N. W. 816, we held that the effect of giving the undertaking under said Sections 5009 and 5010 was not simply to release the property from the attachment, but that in the language of the statute itself it discharged the attachment. „ It wiped out or annihilated it, and the undertaking was put in its place. Logically, and we think in*473evitably, following this, we held that thereafter the attachment could not be discharged by the judge or court, for the reason that there was no longer any attachment to be discharged, nothing for such order to be directed against. In this case, however, an order was made in terms discharging the attachment. The order was erroneous, but whether, void or not, it is not necessary, in our view of the case, to discuss or decide. Upon the surface there appear to us strong reasons for holding it voidable, but not void, though in Paddock v. Matthews, 3 Mich. 18, such an order, made under similar circumstances was regarded as void. Without, however, pursuing this particular question further, or deciding it, we shall treat the order, so far as it undertakes to discharge the attachment, as a valid and existing order; but a different question is presented when we come to consider the effect of that part of the order assuming to cancel and declare the undertaking ’ void. This question was not, in terms at least, submitted to the judge. Any order he might make upon that distinct question under such circumstances would have no effect either to validate or invalidate uhe undertaking. It left it just where his order would have left it if it had stopped with discharging the attachment, for that would have decided the only question presented to him by the motion, and consequently the only question upon which he could pronounce judgment. A court or judge may only adjudicate upon and decide the controversy submitted. Nothing more is presented for decision, and nothing moréis coram judice. Black, Judg. § 242, and cases there cited. If this undertaking became void and of no further effect upon the entry of such order, it was not because the order so said, but because such was the legal effect of discharging the attachment. If the quéstion of the further life or force of this undertaking was not before the judge, his expression of his opinion thereon, although in the order, was voluntary and obiter, and does not affect the parties or their rights; so that-the question here presented is precisely the same as it would have been if the order had made *474no reference to the bond or undertaking and its cancellation. The rule of res judicata, as contended for by respondents, is not applicable to so much of the order as assumes to cancel the undertaking. The question, then, in our view, is simply this: What is or would be the effect upon this undertaking, given under said Sections 5009 and 5010, of a subsequent valid order discharging the attachment? We say valid, for such we assume the order under consideration to be, for the purposes of this case at least, until vacated or reversed. When Monk and his sureties gave this undertaking it was voluntary on their part. They gave it knowing that its purpose and effect was to discharge the attachment, and that it was to stand as plaintiff’s security in the place of the attachment lien which they thus secured to be. released to Monk. The attachment security was given, upon the. strength of. this promise, and they gave the promise for that purpose. Their undertaking was absolute and unconditional to pay the judgment if one should be recovered. It seems to us that Ferguson v. Glidewell, 48 Ark. 195, 2 S. W. 711, covers all the questions involved here. There the action was upon an undei taking given to discharge the attachment. After the giving .of the undertaking judgment was rendered by the court in favor of the plaintiff and against the defendant on the cause of action, but the court ordered tho attachment discharged. It was held that the order of the court discharging the attachment did not release the makers of the undertaking. In McCombs v. Allen, 82 N. Y. 114, an undertaking had been given to discharge an attachment with the same conditions as in the undertaking bef me us. After the giving of the undertaking, the attachment debtor was adjudicated a bankrupt, and the attachment was thereby dissolved. The court held, in an .action on the undertaking, that the promise of the undertaking was unconditional, and the discharge of the attachment could not avail the defendants when called upon to perform their promise. In Inman v. Stratton, 4 Bush. 445, the court held that a bond given for the discharge of an attach*475ment rendered the obligors unconditionally bound to perform the judgment of the court in the action, and that the sufficiency of the grounds for the attachment could not thereafter be inquired into, and that the obligors in the bond were concluded from controverting such grounds. The same ruling'had been previously announced by the same court in Hazlerigg v. Donaldson, 2 Metc. (Ky.) 445. Bunneman v. Wagner, (Or.) 18 Pac. 841, was an action on an undertaking like the one we are now considering. After the giving of the undertaking, the defendant, the principal, died. It was contended that his death discharged the attachment, and consequently destroyed the obligation of the undertaking. The court held that the attachment was not dissolved by the death of the defendant, but expressed the positive opinion that, even if it were otherwise, such dissolution would not affect the liability of the sureties on the undertaking. Billingsly v. Harris, 79 Wis. 103, 48 N. W. 108, was an action upon an undertaking for the release of attached property. The undertaking was, as in the case at bar, to pay any judgment that might be recovered against the defendant. The attachment was issued on the ground that the defendant therein wras .a non-resident. In the action on the undertaking against the sureties they sought to avoid thtir liability by showing that the attachment defendant was not a non resident, and that consequently there was no ground for the attachment. The court held that the defendants were “absolutely liable on the obligation, -whether the attachment was wrongfully or rightfully sued out.” In Wade on Attachments (Section 183, et seq.) the doctrine of the above cases is accepted as the prevailing law. It seems to us to be founded on good reason. The defendant in the attachment, with full knowledge of whether the grounds upon which the attachment issued are true or false, and know ing that, if false, the attachment cannot stand, elects to treat the attachment as valid and properly issued, and voluntarily gives the plaintiff other security in the place of the attachment lien, and thereby secures its release. Having deliberately done *476this, neither he nor the sureties, who have voluntarily undertaken to stand in his place, ought to be allowed afterwards, against the consent of the plaintiff, to withdraw or destroy such substituted security in the absence of facts showing fraud or imposition on the part of the plaintiff. To hold that the undertaking may be avoided by a subsequent discharge of the at tachment would be to substitute a new contract for the one the parties had made, and to make conditional and contingent what the parties had agreed should be unconditional and absolute.
As a necessary sequel to these views, the judgmert of the trial court that the facts recited constituted a good defense to plaintiffs’ action on the undertaking, was, in our opinion -wrong. The return to the principal, Monk, by the sureties of the security given them to indemnify them for signing the undertaking may be unfortunate for them; but the plaintiffs were not responsible for and their rights cannot be affected by it. The judgment of the circuit court is reversed, and the cause remanded for a new trial.
All the judges concur.