Opinion
WEINBERGER, J.*This is an appeal from a judgment denying a writ of mandate sought to compel respondents to employ appellant without requiring her to take and subscribe to the following oath: “I,_, do solemnly swear (or affirm) that I will support and defend the Constitution of the United States and the Constitution of the State of California against all enemies, foreign and domestic; that I will bear true faith and allegiance to the Constitution of the United States and the Constitution of the State of California; that I take this obligation freely, without any mental reservation or purpose of evasion; and that I will well and faithfully discharge the duties upon which I am about to enter.”
In the petition for the writ, appellant sought an order from the Superior Court in Contra Costa County for the issuance of a peremptory writ of mandate “commanding respondents to offer petitioner the job she applied for or a reasonable alternative position” and for damages. The petition discloses that on or about September 24, 1973, appellant, a student at Diablo Valley College, sought employment with respondents. Appellant spoke to the cafeteria manager, who was an employee of respondents, regarding employment. On September 25, 1973, appellant was told by the manager that she would start work in the cafeteria on the following Tuesday and would be given an average of nine hours work per week. The manager then requested that appellant sign the oath set out above. When appellant refused she was told that she could not have the job. Respondents admit that appellant' was denied employment solely due to her refusal to sign the oath.
The crux of appellant’s petition is that respondents, by requiring her to sign the oath as a condition of employment, have unlawfully required a surrender of First Amendment rights by bringing into effect Government *547Code section 3109, which reads as follows: “Every person having taken and subscribed to the oath or affirmation required by this chapter, who, while in the employ of, or service with, the state or any county, city, city and county, state agency, public district, or disaster council or emergency organization advocates or becomes a member of any party or organization, political or otherwise, that advocates the overthrow of the government of the United States by force or violence or other unlawful means, is guilty of a felony, and is punishable by imprisonment in the state prison not less than one or more than 14 years.”
After alleging the legal conclusion that “Respondents have required a surrender of First Amendment rights as a condition of employment” the petitioner then alleges that respondents have a clear and present legal duty “to refrain from unlawfully limiting the exercise of petitioner’s right to freedom of speech and freedom of assembly” and that at all times respondents have been able to perform this duty but have failed to do so.
The respondents’ answer to the petition for the writ of mandate denies the above allegations and alleges the affirmative defense, among others, that “Respondents are under no duty to employ petitioner despite her refusal to take and subscribe to said oath or affirmation,” and, “Respondents have no discretion to hire employees who refuse to take the loyalty oath.”
According to appellant, “This Appeal presents the question of the constitutionality of the Oath of Office required under Article XX, Section 3 of the Constitution of California, when read in concert with Government Code Section 3109”; the petition properly states a justiciable case for granting mandamus and declaratory relief; and the trial judge abused his discretion in denying such relief.
Respondents contend that the trial court’s decision was wholly proper, given the pleadings filed by appellant, and that the record clearly shows that appellant did not ask for declaratory relief. Respondents further contend that the memorandum of decision filed by the trial judge makes it apparent that he did not reach the merits of the claimed unconstitutionality of Government Code section 3109 or the oath to which that section refers.
The trial court’s memorandum of decision states in pertinent part: “Petitioner relies on Vogel vs. County of Los Angeles, 68 C.2d 18, which *548based its decision in turn on Elfbrandt vs. Russell, 384 U.S. 11, and Keyishian vs. Board of Regents, 385 U.S. 589, 17 L.Ed 2d 629. The holding of all of these cases is that it is unconstitutional to require compliance with an oath ‘which applies to membership without the specific intent to further the illegal aims of the organization.’ The Vogel case held unconstitutionally impermissible only the second part of the required oath relating membership in organizations. [If] The oath here does not relate to membership in any organization. Section 3109 does. The issue is not presented whether or not Section 3109 is valid. It is not alleged petitioner is, or plans to join such an organization. This case then is not ripe for presenting such an issue. [I] I am presented with Government Code Section 3101 requiring all public employees to take the oath; Section 3103 providing the required oath shall be the one required by Article XX, sec. 3 of the California Constitution and a decision of the District Court of Appeal (Smith vs. County Engineer of San Diego County, 266 CA 2d 645), holding the requirement that such an oath be subscribed is a condition precedent to lawful employment.”
Respondents also contend in their brief that they have no interest in defending the enforceability (meaning constitutionality) of Government Code section 3109. They point out that the State of California has not been named as a party so neither the Attorney General nor district attorney has appeared to defend the constitutionality of the cited code section.
It is thus apparent that the issue raised by the petition was not joined either in the trial court or here. As we view it the sole question for decision is whether the judgment entered below is correct. As is stated in 6 Witkin, California Procedure (2d ed. 1971) Appeal, section 226, pages 4215-4216: “If the decision of the lower court is right, the judgment or order will be affirmed regardless of the. correctness of the grounds upon which the court reached its conclusion. Two theories seem to be involved here: First, that the appellate court reviews the action of the lower court and not the reasons for its action; second, that there can be no prejudicial error from erroneous logic or reasoning if the decision itself is correct.”
The frequently cited rule, most recently reaffirmed in D’Amico v. Board of Medical Examiners (1974) 11 Cal.3d 1, 19 [112 Cal.Rptr. 786, 520 P.2d 10], was stated in Davey v. Southern Pacific Co. (1897) 116 Cal. 325, 329 [48 P. 117]: “The fact that the action of the court may have been based upon an erroneous theory of the case, or upon an improper or unsound course of reasoning, cannot determine the question of its *549propriety. No rule of decision is better or more firmly established by authority, nor one resting upon a sounder basis of reason and propriety, than that a ruling or decision, itself correct in law, will not be disturbed on appeal merely because given for a wrong reason. If right upon any theory of the law applicable to the case, it must be sustained regardless of the considerations which may have moved the trial court to its conclusion.”
The appellant argues that although she asked for a writ of mandate the court abused its discretion in denying declaratory relief; that public employment may not be conditioned on the surrender of constitutionally protected rights, absent a compelling state interest; and that Government Code section 3109 violates the Fourteenth Amendment of the United States Constitution because of overbreadth and vagueness.
The error in the appellant’s position, hinted at but not expressly stated in the quoted portion of the trial judge’s memorandum of decision, is that her petition is based upon a major premise that is palpably fallacious. It is paradoxical to urge, as does appellant, that by taking an oath to support and defend and to bear true faith and allegiance to the Constitution of the United States she is being required in some manner to surrender First Amendment rights guaranteed by that same Constitution. This anomalous result occurs, she asserts, because by signing the oath she would be exposed to possible prosecution under Government Code section 3109. Appellant’s major thesis requires more detailed analysis.
Section 3109 was enacted in 1950 and has since remained in the Government Code in its original form except for an amendment in 1971 substituting the words “disaster council or emergency organization” for “civilian defense organization.” (Stats. 1971, ch. 38, § 10, p. 51.) Government Code section 3103, also enacted in 1950, originally contained the oath which government employees were required to sign. That oath set forth in its first paragraph the identical language used in the oath submitted to appellant for signature, but also had the following second paragraph: “ ‘And I do further swear (or affirm) that I do not advocate, nor am I a member of any party or organization, political or otherwise, that now advocates the overthrow of the Government of the United States or of the State of California by force or violence or other unlawful means; that within the five years immediately preceding the taking of this oath (or affirmation) I have not been a member of any party or organization, political or otherwise, that advocated the overthrow of the *550Government of the United States or of the State of California by force or violence or other unlawful means except as follows:_(If no affiliations, write'in the words “No Exceptions”) and that during such time as I am a member or employee of the_(name of public agency) I will not advocate nor become a member of any party or organization, political or otherwise, that advocates the overthrow of the Government of the United States or of the State of California by force or violence or other unlawful means.’ ”
The validity of this oath was upheld in Pockman v. Leonard (1952) 39 Cal.2d 676 [249 P.2d 267]. Thereafter, in 1953, the detailed form of oath was deleted from Government Code section 3103 and was set forth in section 3 of article XX of the Constitution of California, which had been amended as of November 4, 1952, so that it required public employees to subscribe to an oath containing identical language to that approved in the Pockman decision.
In 1967 the Supreme Court overruled Pockman and, on the authority of Keyishian v. Board of Regents (1967) 385 U.S. 589 [17 L.Ed.2d 629, 87 S.Ct. 675], and Elfbrandt v. Russell (1966) 384 U.S. 11 [16 L.Ed.2d 321, 86 S.Ct. 1238], concluded that “the oath required by the second paragraph of section 3 of article XX of the California Constitution is invalid. ...” (Vogel v. County of Los Angeles (1967) 68 Cal.2d 18, 22 [64 Cal.Rptr. 409, 434 P.2d 961].) By necessary implication the first paragraph of section 3, article XX, containing the exact language of the oath presented to appellant for subscription, must be deemed to have been held free from constitutional impairment. This conclusion was reached by the court in Smith v. County Engineer (1968) 266 Cal.App.2d 645, 649-650 [72 Cal.Rptr. 501], as follows: “Our attention has not been called to any case directly touching upon the meaning and effect of that portion of the complete oath with which we are concerned. The most recent case in this state which examined section 3 was Vogel v. County of Los Angeles, 68 Cal.2d 18 [64 Cal.Rptr. 409, 434 P.2d 961], in which that portion of the oath having to do with membership in organizations advocating overthrow of the state and federal governments by force and violence was declared unconstitutional under the federal Constitution. The case does not discuss the portion of the oath with which we are here concerned. We agree with the suggestion of counsel for respondents that that portion of the oath may be deemed severable and, thus, the portion under consideration by us to be unaffected by Vogel. No contrary position is stated by appellant.”
*551Having concluded, as we do, that the oath which appellant refused to sign is not in itself unconstitutional, we need to determine whether, as claimed by appellant, it becomes constitutionally defective when read in concert with Government Code section 3109.
Chapter 8 (§§ 3100-3109) was added to the Government Code by Statutes of 1950 (3d Ex. Sess.) chapter?, section l,page 15, effective October 3,1950. This statute, commonly known as the Levering Act, was enacted at a time when the United States Supreme Court hadpassed upon thereciprocal rights of the public and its employees as follows: “It has been held that a governmental body has the right to direct that its employees shall not belong to organizations which they know advocate overthrow of the government by force or other unlawful means, and that they may be required to make sworn statements similar to the oath prescribed by section 3103 as a condition to obtaining or continuing in public employment. (Adler v. Board of Education of the City of New York, 342 U.S. 485 [72 S.Ct. 380, 96 L.Ed. 517]; Garner v. Los Angeles Board, 341 U.S. 716 [71 S.Ct. 909, 95 L.Ed. 1317]; Gerende v. Board of Supervisors of Elections, 341 U.S. 56 [71 S.Ct. 565, 95 L.Ed. 745]; cf Dennis v. United States, 341 U.S. 494 [71 S.Ct. 857, 95 L.Ed. 1137]; American Communications Assn. v. Douds, 339 U.S. 382 [70 S.Ct. 674, 94 L.Ed. 925].) A person’s associates, as well as his conduct, are relevant factors in determining fitness and loyalty, and the state, under its police power, may properly limit a person’s freedom of choice between membership in such organizations and employment in the school system. (Adler v. Board of Education of the City of New York, 242 U.S. 485 [72 S.Ct. 380, 385, 96 L.Ed. 517].)” (Pockman v. Leonard, supra, 39 Cal.2d 676 at pp. 686-687.)
Government Code section 3109 is a part of chapter 8, and when it refers to a “person having taken and subscribed to the oath or affirmation required by this chapter(italics added) it means the oath originally spelled out in Government Code section 3103 and subsequently transferred in identical language to article XX, section 3 of the Constitution of California. It is noteworthy that appellant did not take or subscribe to the oath or affirmation required by chapter 8, she was not asked to subscribe to such oath, and, in view of the decision in Vogel v. County of Los Angeles, supra, 68 Cal.2d 18, she could not be required legally to take such oath. It would thus be impossible for Government Code section 3109 to be applicable to her or any other person who took the valid portion of the oath that was determined to be severable and unaffected by Vogel. Quite apart from the fact that the crime denounced in section 3109 cannot be committed unless one has taken and subscribed to the *552oath, part of which has been found unconstitutional, it is inconceivable that one who signed the oath containing the constitutionally impermissible language and then did any of the things denounced by section 3109 would be subject to prosecution under that section. In view of Vogel it should not be assumed that a statute is constitutional which makes it criminal to do what one cannot constitutionally be required to promise not to do. “It is the policy of this state to construe a penal statute as favorably to the defendant as its language and the circumstances of its application may reasonably permit; just as in the case of a question of fact, the defendant is entitled to the benefit of eveiy reasonable doubt as to the true interpretation of words or the construction of language used in a statute. (Walsh v. Department of Alcoholic Bev. Control (1963) 59 Cal.2d 757, 764-765 [31 Cal.Rptr. 297, 382 P.2d 337], and cases cited.)” (Keeler v. Superior Court (1970) 2 Cal.3d 619, 631 [87 Cal.Rptr. 481, 470 P.2d 617, 40 A.L.R.3d 420].)
Despite what has been said, we do not find that Government Code section 3109 is unconstitutional. That issue is not before us. However, since the oath on which a prosecution under the section must be based has been found unconstitutional in part, and that part refers to activities prohibited by section 3109, the Legislature might well consider repealing the section.
The judgment is affirmed.
Molinari, P. J., and Sims, J., concurred.
A petition for a rehearing was denied March 24, 1976.
Retired judge of the superior court sitting under assignment by the Chairman of the Judicial Council.