
41 Cal.App.2d 161 (1940)
FLORENCE M. MARTIN (Substituted in Place of MATILDA L. THROOP, Guardian, etc.), Respondent,
v.
PACIFIC SOUTHWEST ROYALTIES, INC., Defendant and Appellant; ROBERT J. MAGDLEN et al., Trustees, etc., Interveners and Appellants.
Civ. No. 12665. 
California Court of Appeals. Second Appellate District, Division Two.  
October 14, 1940.
 Maurice C. Myers for Defendant and Appellant.
 Robert J. Madglen, in pro. per., and I. Henry Harris for Interveners and Appellants.
 W. I. Gilbert for Respondent. *165
 Wood, J.
 The complaint in this action sets forth two causes of action, one for unlawful detainer and the other to quiet title to the property which is the subject of the unlawful detainer action. The appeal is from a judgment rendered in favor of plaintiff.
 An oil and gas lease was executed on May 31, 1932, by Charles F. Martin and Florence M. Martin, husband and wife, as lessors to defendant as lessee, covering lot 8, block "B" of Summers Villa tract in the County of Los Angeles. The lease provided that defendant should pay a monthly rental of one-sixth of all oil, gas and other hydrocarbon substances produced, saved and sold from the leased premises. In 1935 Charles F. Martin died. The decree of distribution which was subsequently made during the probate of his estate distributed all of his interest in the above described lease and real property to Florence M. Martin. Thereafter Mrs. Martin was duly adjudged to be incompetent and Matilda L. Throop was appointed guardian of her estate. In 1937 defendant defaulted in the payment of the one-sixth royalties required by the lease to be paid as monthly rental and ever since has continued to be in default. A notice of default and demand for payment of the rental was served upon defendant on July 20, 1937, and upon defendant's failure to make payment in compliance with the demand, a notice of termination of the lease and a three-day notice to quit the premises were served on September 1, 1937. All of the notices were duly served upon the secretary of defendant corporation. On September 10, 1937, Matilda L. Throop, as guardian of the estate of Florence M. Martin, incompetent, commenced the present action. Defendant was served with an unlawful detainer summons requiring it to appear and answer the complaint within three days. Defendant's answer placing all of the material allegations of the complaint in issue was filed within the three days period. Upon filing the action plaintiff secured a writ of possession under the provisions of section 1166a of the Code of Civil Procedure and obtained possession of the leased premises. Defendant's motion to vacate the order granting the writ of possession upon the ground that section 1166a is unconstitutional was denied. Permission was thereafter given defendant to file a supplemental answer alleging that the section is unconstitutional in that it deprives persons of property without due process of *166 law. At the time of trial plaintiff was permitted, over defendant's objection, to amend her complaint to include allegations of fraud, deceit, false accounting and theft of oil. Plaintiff, however, failed to prove such allegations during the trial. By its judgment the court decreed that plaintiff was entitled to immediate possession of the premises in question; that defendant be required to deliver to plaintiff a quitclaim deed to the real property; that all of defendant's right, title and interest under the oil and gas lease be terminated, and that plaintiff be awarded $500 as attorney's fees. Subsequently, in 1938, Florence M. Martin, who had been restored to competency, was substituted as party plaintiff in place of Matilda L. Throop.
 [1] During the trial defendant sought to introduce evidence to the effect that although the secretary of the defendant corporation had been duly served with the three notices prior to the commencement of this action he had remained silent concerning them in reliance upon plaintiff's promise not to commence any action for a reasonable length of time. The action of the court in sustaining plaintiff's objection to the introduction of such evidence is now assigned as error. Since no waiver or estoppel of any kind was pleaded by defendant, such evidence was clearly outside the issues and was properly excluded by the court.
 [2] The contention of defendant that at no time did the court have jurisdiction over the person of defendant and the subject matter of the controversy simultaneously cannot be sustained. The complaint was filed on September 10, 1937, and on the same day plaintiff obtained possession of the disputed premises by virtue of the writ of possession. The summons was served on defendant three days later. Upon the authority of Big Bend Land Co. v. Huston, 98 Wash. 640 [168 P. 470], defendant contends that the service of the summons after defendant had been ousted from possession did not confer jurisdiction upon the court to determine the unlawful detainer action. It will be noted that in Big Bend Land Co. v. Huston the action was for unlawful detainer only and did not include a cause of action to quiet title as in the instant case. Although the facts were similar in that plaintiff obtained possession of the premises in dispute by virtue of a writ of restitution prior to serving the summons upon defendant, a distinguishing feature *167 lies in the fact that the defendant in the Washington case did not make a general appearance by filing an answer to the complaint. The only appearance made by the defendant was a special one for the purpose of moving to quash the writ of restitution. The Washington court concluded that since the sole purpose of an unlawful detainer action is to obtain possession of premises wrongfully withheld the court had no jurisdiction to determine the controversy under the circumstances because plaintiff was already in possession of the premises. However, in the case now before us our consideration is not limited to determining whether the court had jurisdiction of the subject matter under the lawful detainer count alone but extends as well to the quiet title count. If the court acquired jurisdiction over defendant's person and simultaneous jurisdiction over the subject matter under either count of the complaint its right to act cannot be questioned. As regards jurisdiction over defendant's person, it is of no consequence that the summons was entitled "unlawful detainer summons" and required an appearance within three days. When defendant appeared and answered both counts of the complaint the court acquired personal jurisdiction over the defendant and any defects in the summons were waived. (Harrington v. Superior Court, 194 Cal. 185 [228 P. 15].) [3] If it be assumed that the court did not acquire jurisdiction over the subject matter of the unlawful detainer action because plaintiff was in possession of the premises before the summons was served on defendant, nevertheless, the quiet title cause of action was proprietary in its nature and in no way dependent upon possession. Unquestionably the superior court has jurisdiction over actions to quiet title to real property.
 [4] Defendant contends that neither of the three notices which were served on defendant prior to commencing this action was a proper notice upon which to found an unlawful detainer action and that plaintiff made an election of remedies in the trial court, electing to rely solely upon the unlawful detainer count and not upon the quiet title count. Since the "three day notice to vacate" which was served on defendant merely demanded possession of the premises and did not, in the alternative demand the payment of the rental then due, defendant argues that the judgment is erroneous. If it be *168 conceded that the notice was defective as the basis for an unlawful detainer action, the defect is not fatal to the judgment. In the first place, defendant's position with respect to the alleged election of remedies is untenable. Plaintiff could not have been compelled to elect as to which of the two causes of action he would rely upon. (Goldwater v. Oltman, 210 Cal. 408 [292 P. 624, 71 A.L.R. 871]; Wilson v. Rigali & Veselich, 138 Cal.App. 760 [33 PaCal.2d 455]). There was no fatal inconsistency between the two causes of action, which both concerned the same subject matter, one being possessory and the other proprietary in nature. Defendant's claim that plaintiff in fact made an election is not borne out by the record. [5] The fact that the complaint was entitled as an unlawful detainer action and the summons entitled as an unlawful detainer summons does not determine the character of the action. Both the unlawful detainer and the quiet title counts of the complaint were in fact answered by defendant, thus putting all material allegations of both counts in issue. The evidence introduced was equally applicable to both counts. [6] The theory upon which the case was tried is to be ascertained by reference to the issues framed by the pleadings and to findings made by the court. (J. M. Brown, Inc., v. W. P. Fuller & Co., 28 Cal.App. 676 [153 P. 960].) [7] The findings of fact are clearly sufficient to sustain a judgment based upon the quiet title count. Assuming the unlawful detainer count to be defective, we must presume that the judgment was based solely upon the quiet title count, the one which supports it. (Watson v. Lawson, 166 Cal. 235 [135 P. 961].)
 Defendant complains of the failure of the trial court to find the specific amount of the rent unpaid, the finding being merely that the defendant was in default in the payment of rent. In paragraph 15 of the lease it is provided: "In the event of any breach of any of the terms or conditions of this lease by the lessee, as to the time of commencing operations or as to the payment of rentals or royalties, and the failure to remedy the same within thirty (30) days after written notice from the lessor so to do, then at the option of the lessor, this lease shall forthwith cease and terminate, and all rights of the lessee in and to the said land shall be at an end". And in paragraph 20 it is further provided: "If the lessee shall fail to perform any of the other terms or conditions of this lease *169 at the time and in the manner hereby required, and which failure shall continue for thirty (30) days after notice in writing requiring the performance thereof, then and thereupon this lease shall be terminated and lessee shall forfeit all rights hereunder. The lessee shall pay to the lessor the royalty herein provided, on the twentieth (20) day of each and every month for the preceding calendar month." [8] The lessor gave written notice to comply with the terms of the lease in the matter of the payment of rentals, and at the expiration of thirty days, the lessee having failed to comply with the terms of the lease, the lessor exercised her option to terminate the lease. Having exercised her right to terminate the lease plaintiff was in position to have her title to the premises quieted. [9] There can be no question concerning the charge that defendant had failed to comply with the terms of the lease, for it is admitted that at the time of the first notice it was in arrears in the sum of $938.93, and at the time of the commencement of the action the balance due was $1,253.23. Defendant was not in position to assert that plaintiff could not declare a forfeiture. [10] In this regard it is to be noted that the general rule that the law abhors forfeitures is not applicable to oil and gas leases. (John v. Elberta Oil Co., 124 Cal.App. 744 [13 PaCal.2d 538]; Hall v. Augur, 82 Cal.App. 594 [256 P. 232].)
 [11] Defendant's complaint concerning the failure of the court to find the specific amount due appears to be applicable, if at all, to the unlawful detainer count, but even as applied to this count it is apparent that defendant is not in position to complain for the reason that no application was made for a stay of execution to permit the redemption of the leasehold estate. It is provided in section 1174 of the Code of Civil Procedure that the court in an unlawful detainer action may in its discretion order that execution shall not issue until five days after the entry of the judgment so that the defendant may pay the judgment and be restored to his estate. The record discloses no abuse of discretion on the part of the court. Section 1179 of the same code provides for relief against the forfeiture of a lease if an application for such relief be filed within thirty days after the forfeiture has been declared by the judgment of the court. Defendant did not file an application for such relief at any time and is therefore *170 not now in position to complain that he was not given opportunity to prevent the forfeiture.
 [12] Defendant was not prejudiced by the ruling of the court excluding testimony concerning the value of the leasehold with its improvements. Since plaintiff properly exercised her option to forfeit the lease, proof of the value of the leasehold would not be a defense to the quiet title action. [13] Even if the judgment had been based upon the unlawful detainer action defendant would not be in position to complain, since no application for relief from the forfeiture was made in accordance with the provisions of sections 1174 and 1179 of the Code of Civil Procedure.
 [14] The plaintiff was designated in the pleadings as "Matilda L. Throop, Guardian of the Estate of Florence M. Martin, Incompetent". Defendant now claims that such designation of the party plaintiff was erroneous. Conceding that the action should properly have been entitled "Florence M. Martin, by her Guardian, Matilda M. Throop", the failure to so caption the complaint was purely a technical error in no way prejudicial to defendant. [15] Furthermore, the error was waived when defendant entered into the stipulation substituting Florence M. Martin as the individual plaintiff.
 It is argued that since the inventory and appraisement in the guardianship proceeding incorrectly lists the property in question as lot 9 instead of lot 8, block "B" of Summers Villa tract, there was no evidence of the guardian's authority to take any action concerning lot 8. It is also claimed that there is no proof of ownership of the property here involved. Any error in the proof of the guardian's authority was waived by the stipulation substituting Florence M. Martin as the plaintiff in this action, for the latter was the real party in interest. [16] Moreover, an incorrect description in the guardian's inventory would not prevent her taking proper steps to recover all of the assets of the ward. So far as proof of ownership is concerned, there is ample evidence that the plaintiff Florence M. Martin was the owner of the property in controversy. A grant deed by N.E. and Elizabeth Townsend conveying the property to Chas. F. Martin was received in evidence. The certified copy of the decree of distribution in the matter of the estate of Charles F. Martin, which was introduced in evidence, shows that the property, correctly described as lot 8, was distributed to Florence M. Martin. *171
 [17] The questions raised by defendant's contention that the judgment wrongfully deprived it of the right, given defendant by the terms of the lease, to remove the personal property located upon the leased premises have become moot. On August 12, 1938, plaintiff Florence M. Martin, in an action commenced in the municipal court of the city of Long Beach, recovered a judgment in the sum of approximately $1,900 against the defendant herein. The personal property in question was seized under a writ of execution, sold to plaintiff and a marshal's certificate of the sale duly issued to her. Since that judgment has long since become final, the questions now raised concerning property in which defendant no longer has any interest have become moot. (Shimpones v. Stickney, 219 Cal. 637 [28 PaCal.2d 673].) [18] Contrary to the contention of defendant, the court did not err in excluding proffered testimony concerning the pendency of the municipal court action. A plea in abatement based upon the pendency of another action between the same parties, involving the same cause of action, must be presented by demurrer (Code Civ. Proc., sec. 430) or by answer (Code Civ. Proc., sec. 434), and if not so presented it will be deemed to have been waived. (Code Civ. Proc., sec. 434; 1 Cal.Jur., p. 35.) Defendant failed to plead the pendency of the other action either by demurrer or answer and therefore must be deemed to have waived the point now raised.
 [19] In view of our conclusions we deem it unnecessary to decide whether or not section 1166a of the Code of Civil Procedure is constitutional. "It is settled as a general principle that courts will not pass on the constitutionality of an act of the legislature if the merits of the case in hand may be fairly determined otherwise without so doing". (11 Amer. Juris., Constitutional Law, par. 94.)
 [20] Under the express conditions of the lease, if defendant failed to pay the rental and such failure continued for thirty days after notice of default, the lease was to terminate at the option of the lessor and all the rights of the lessee thereunder would be forfeited. Admittedly defendant was in default in the payment of rent for more than thirty days after notice of default and demand for payment was served upon it. The lease was therefore terminated and all rights of defendant forfeited, as the trial court properly held. If we assume, without deciding, that section 1166a of the Code *172 of Civil Procedure is unconstitutional the result is in nowise prejudicial to defendant, for when plaintiff acquired possession of the property by virtue of the writ authorized by the section, defendant no longer had any rights in the property. In Reeves v. Watson, 124 Cal.App. 534 [12 PaCal.2d 1050], an action for unlawful detainer, a receiver was appointed to take charge of the property after the service of a three days notice under section 1161 of the Code of Civil Procedure. On appeal it was charged that the appointment of the receiver was void by reason of the failure to comply with the governing code provisions. The reviewing court held that the defendant was not prejudiced, since he was guilty of an unlawful detention of the leased property. The court remarked: "We do not believe they can question the act of respondents in placing a receiver in possession of their own property even though the statutory provisions relative to the appointment of a receiver were ignored".
 [21] Defendant's final contention is that the court erred as a matter of law in awarding plaintiff $500 as attorney's fees. It is urged in reliance upon Flournoy v. Everett, 51 Cal.App. 406 [196 P. 916], that attorney's fees are not recoverable in an unlawful detainer action. That case is to be distinguished from the present case, however, for the plaintiff in the Flournoy case failed to allege facts upon which any liability for attorney's fees could be based. In the instant case it appears from paragraph 21 of the lease, a copy of which was attached to the complaint and incorporated therein by reference, that defendant agreed to pay plaintiff such attorney's fees as might be incurred in clearing the record title from the cloud created by the recorded lease. The fact that the complaint, which contains a prayer for general relief, contained no prayer for attorney's fees is immaterial, for defendant by its answer placed all the allegations of the complaint in issue. [22] It is established that "when an answer has been filed and issues joined, regardless of the deficiency of the prayer to a complaint, the court may grant plaintiff any relief consistent with the issues raised by the pleadings." (Pedro v. Soares, 18 Cal.App.2d 600 [64 PaCal.2d 776]; Code Civ. Proc., sec. 580.)
 The judgment is affirmed.
 Moore, P. J., and McComb, J., concurred.
