Appeal by plaintiff from a judgment of nonsuit and an order denying a new trial.
The action was for damages for personal injuries, and the complaint alleged in substance that defendant operated a railroad upon a public highway in Alameda county, known as Stanford street; that there was a culvert or drain crossing said street and extending under the tracks of defendant’s road, which was securely and safely covered with planking and earth; that defendant caused this drain to be opened and excavated to a greater depth and width, and thereafter negligently left it open and unprotected, and in a dangerous condition for the whole distance across said street and under defendant’s track. That while it remained in this dangerous condition, plaintiff, without knowledge thereof, in proceeding, in the night-time, to “ cross said railroad track, on said street,” fell between the rails of said track into the excavation, and received the injuries of which she complained.
At the trial, plaintiff, without amendment of her com*328plaint, offered evidence tending to show that the point where the drain or culvert crossed beneath defendant’s track, and where the accident occurred, instead of being, as alleged, on a public street, was, in fact, on the private right of way of the defendant, running over land admittedly owned by it in fee, but that at the point in question there was a footpath crossing said railroad, which was then, and had been for many years, constantly and continuously used by the people of the neighborhood, under circumstances such as authorized the inference that it was so used by the consent and license of the defendant.
This evidence was all excluded under the objection of the defendant that it was “ irrelevant, immaterial, and incompetent,” and, the plaintiff resting without offering other proof, the nonsuit followed.
The only question arising is. whether this evidence was properly rejected, since, if it was, the nonsuit was logical, and the judgment and order should be affirmed.
' In support of the ruling, the respondent now urges that the evidence was properly rejected, because it did not tend to establish any issue joined by the pleadings; that the complaint sought to charge the defendant for injuries inflicted through its negligence in opening and leaving exposed and unprotected a dangerous excavation upon a public street; while the case sought to be made by the offered evidence was that of an injury resulting from such an excavation made upon the private property of. defendant, but at a point where plaintiff was privileged to pass by the defendant’s license.
That there was thus presented a material variance between the pleadings and the proof is quite obvious, and, indeed, is not denied by appellant. But appellant contends that the question of variance which is now relied upon by respondent was not raised in the court below; that no such specific objection was there made, nor was it fairly included within the general objection interposed; that, had it been called to the attention of counsel for appellant at the time the evidence was of*329fered, plaintiff would have had an opportunity to conform her pleading to the proof, and thus have obviated the objection; and it is urged that respondent should not now be heard to make such objection for the first time in this court, and thus cut off plaintiff’s right to so amend, and have her case tried upon its merits.
It does not appear that this specific objection was suggested at the trial, but the objection there made, and the ruling had, would seem to have proceeded upon a different theory from that upon which respondent now rests. But, unfortunately for appellant, this fact of itself constitutes no sufficient ground for reversing the ruling of the court. 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 propriety. 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.
Thus, in Chabot v. Tucker, 39 Cal. 434, it is said by Mr. Justice Temple for the court: “The proper subjects of review in this court are the rulings and decisions of the district court, but not the reasons given for such rulings. The fact that the statute requires the judge to state in writing the grounds upon which the motion was granted or denied does not make it incumbent on the prevailing party to defend the logic of the judge. It is enough if the decision be correct.” And again, by the same learned judge, in In re Kingsley, 93 Cal. 576, 577: “With the process of reasoning by which the court reached its conclusion we have nothing to do. That may have been erroneous and the ruling correct. To justify a reversal, it is incumbent upon the appellant to show an erroneous ruling, and not merely bad rea*330sorting or mistaken views of the law.” (See, also, People v. Crowey, 56 Cal. 39; White v. Merrill, 82 Cal. 15; Shanklin v. Hall, 100 Cal. 26; Groome v. Almstead, 101 Cal. 425, 429. )
In other words, it is judicial action, and not judicial reasoning or argument, which is the subject of review; and, if the former be correct, we are not concerned with the faults of the latter.
This principle must result in sustaining the ruling in question. That the offered evidence was inadmissible under the complaint, and was for that reason properly excluded, is manifest, since it had no tendency to establish the facts therein alleged. Assuming it tó be true that it was rejected for another and insufficient ground, that fact cannot affect the propriety of the ruling. An objection to evidence is but a reason offered for its exclusion. The objection may be untenable or insufficient, yet, if sustained, and there appears any other reason for which the evidence should have been excluded, the ruling must stand. And even where no objection is made, but the court excludes evidence of its own motion, the ruling will be sustained, if the evidence was for any reason inadmissible.
“If the court decides correctly in rejecting the testimony, it is not important whether the best objection was made, or whether any objection was made.” (People v. Graham, 21 Cal. 266. And see Parker v. Smith, 4 Cal. 105; People v. Wallace, 89 Cal. 166; Clark v. Huber, 25 Cal. 594, 598.)
Nor does the fact that a party has made an improper or insufficient objection in the court below preclude or estop him in this court from justifying a ruling in his favor upon any other ground. In Clark v. Huber, supra, the appellant, as here, objected to the respondent being permitted to make in this court, in support of the ruling, an objection not made in the court below. The facts upon which the objection arose were precisely similar to the circumstances involved here. The defendant in that case had in the court below offered certain evi*331dence to show an estoppel, which was excluded on a general objection of the plaintiff. In this court the plaintiff, while conceding that the facts offered would have established an estoppel, justified the ruling on the new ground that no estoppel had been pleaded, and hence, the evidence was properly rejected. In response to the contention of the defendant that the plaintiff should be confined to the objection made below, it is there said:
“The reasoning, pushed to its consequences, would preclude the respondent from submitting any argument in favor of the ruling. It is unnecessary, however, to consider the question upon principle, for it is well settled that the burden of showing error is upon the party who alleges it. The error alleged, here is the exclusion of the defendant’s testimony. The respondent is at liberty to suggest any ground that he may choose to show that the ruling was right, whether advanced in the discussion below or not. If the testimony had been admitted, and Clark had appealed, he would have been required to confine himself to objections specifically taken at the trial and stated in the record. The distinction is between the case of a party seeking to reverse a judgment and that of a party resisting the attempt.”
The cases of Dikeman v. Norrie, 36 Cal. 94, McKay v. Riley, 65 Cal. 623, and Howland v. Oakland etc. Ry. Co., 110 Cal. 513, relied upon by appellant, in which it is held that the party is restricted to the specific objection taken below, all present instances where the objecting party was seeking to overthrow the judgment. The distinction between the rule applied in those cases and the one which must govern here is aptly stated in Clark v. Huber, supra. This distinction springs from the familiar rule that all intendments run in support of the judgment.
While it is matter of regret that the plaintiff may be debarred by the predicament in which the case is found from having her facts submitted to a jury, yet primarily the fault lies with her. It was incumbent upon her to *332foresee the danger of taking a ruling upon the evidence offered without amending her complaint. The variance presented was so manifest that it should have been perceived without suggestion; but, moreover, it was suggested, although not in express terms, by the objection made. In Strong v. Patterson, 6 Cal. 157,158, where the court below had admitted evidence of a fact not pleaded, over an objection that it was “ irrelevant,” the judgment was reversed on that ground, and the court, by Mr. Chief Justice Murray, said:
“ While we hold that a general exception to the admission of testimony is insufficient, because the party offering it is entitled to know the ground of such objection, so that he may supply other evidence or obviate it, we think that an objection that testimony is irrelevant is sufficiently explicit, as it can mean but one thing, viz., that the testimony does not fit the case, or is not proper under the issues framed.”
For these reasons the judgment and order must be affirmed.
It is so ordered.
Harrison, J., Temple, J., and Garoutte, J., concurred.