
116 Cal.App.3d 431 (1981)
172 Cal. Rptr. 135
CHARLES WESLEY COLEMAN et al., Petitioners,
v.
THE SUPERIOR COURT OF ALAMEDA COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Docket No. 49525.
Court of Appeals of California, First District, Division Four.
March 2, 1981.
*432 COUNSEL
Abigail R. Marshall for Petitioners.
No appearance for Respondent.
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, Edward P. O'Brien, Assistant Attorney General, Robert R. Granucci and Clifford K. Thompson, Deputy Attorneys General, for Real Party in Interest.
OPINION
RATTIGAN, Acting P.J.
Petitioners were charged in a single complaint with having committed various felonies. They were arraigned before a magistrate, entered pleas of not guilty, and were held to answer in respondent court after preliminary examinations conducted on the complaint. An information charging them with the felonies was *433 filed accordingly. They moved respondent court for an order setting it aside, pursuant to Penal Code section 995, on the grounds (1) that each petitioner had been denied his right to a timely preliminary examination as provided in section 859b;[1] and (2) that in consequence petitioners had "not been legally committed by a magistrate" within the meaning of section 995.[2] Their motion was denied. They thereupon petitioned this court for a writ of prohibition restraining their further prosecution on the information.
Petitioners were initially charged in a complaint which commenced action No. 75920 C. They were arraigned before a magistrate on October 19, 1979,[3] and the action was continued to October 25 for the entry of pleas. Petitioners were in custody on those days and at all pertinent times.
Petitioners were present on October 25, each with separate counsel. Each entered pleas of not guilty to the various charges stated against him in the complaint. After an extended discussion with the prosecutor and the several defense attorneys, the magistrate set various defense motions for hearing on November 14. He also set a preliminary examination to commence on November 19. The latter setting was obviously more than 10 court days after the entry of the pleas, but there was no objection. The question whether petitioners would "waive time" was raised more than once, but it was not pursued.
*434 The hearing on defense motions was called by another magistrate on November 14. All four petitioners promptly joined in a motion "to dismiss" action No. 75920 C on the grounds that none of them had "personally waived" the 10-court-day requirement of section 859b; that more than 10 court days had elapsed since the pleas had been entered on October 25; and that the requirement had not been observed.[4] The magistrate took the motion under submission pending his examination of a reporter's transcript of the October 25 proceedings.
On November 19, the magistrate filed an order spelling out his disposition of the motion in detail. He first found that no petitioner had "personally waived time" on October 25. He then stated that "dismissal was mandatory" under the circumstances, citing three decisions (Johnson v. Superior Court (1979) 97 Cal. App.3d 682, 686 [158 Cal. Rptr. 899]; Irving v. Superior Court (1979) 93 Cal. App.3d 596, 600 [155 Cal. Rptr. 654]; Serrato v. Superior Court (1978) 76 Cal. App.3d 459 [142 Cal. Rptr. 882].) He further stated that he was without authority to "dismiss" the action as a "magistrate" (citing People v. Peters (1978) 21 Cal.3d 749, 753 [147 Cal. Rptr. 646, 581 P.2d 651]), but granted petitioners' motion by ordering them "discharged" pursuant to section 871.[5]
The prosecutor forthwith filed a new complaint (or complaints) which stated identical charges against petitioners in action No. 76230 C. On the same day, they were arraigned in that action and entered *435 pleas of not guilty. Preliminary examinations were commenced on November 21 (well within 10 court days of the entry of the new pleas), and all 4 petitioners were held to answer. The information against them was filed in respondent court on December 12.
Petitioners' motion pursuant to section 995 was noticed and heard in 1980. They argued that dismissal was commanded by Johnson v. Superior Court, supra, 97 Cal. App.3d 681. Respondent court stated that it was not "following" Johnson on the ground that petitioners were "estopped from complaining," and denied the motion.[6] The present proceeding was thereupon commenced in this court.
As the magistrate pointed out in granting petitioners' motion, it placed him in the dilemma caused by the holding in Peters that a "magistrate" was not empowered to "dismiss" a criminal action because he did not qualify as a "court" within the meaning of the pertinent statutes. (See People v. Peters, supra, 21 Cal.3d 749 at pp. 750-753.) Johnson was the first published decision reflecting this problem where dismissal by a magistrate was sought on the ground that the defendant had been denied a prompt preliminary examination pursuant to section 859b. (Johnson v. Superior Court, supra, 97 Cal. App.3d 682.) The problem has reappeared in at least one other section 859b case (Simmons v. Municipal Court (1980) 109 Cal. App.3d 15 [167 Cal. Rptr. 608]), and it is presented in still others which are now pending in various appellate courts.
The problem has been resolved for the future by a comprehensive 1980 enactment which has amended and added pertinent statutes, effective January 1, 1981, to provide (among other things) that a magistrate may and "shall dismiss" a criminal action where the 10-court-day requirement of section 859b has not been "personally waived" by a defendant in custody and has not been observed. (Stats. 1980, ch. 938, § 1, p. 2965 [amending § 859b]; see also id., §§ 2-3 [amending §§ 861 and 871], § 4 [adding § 871.5], and §§ 5-8 [amending §§ 1238, 1384, *436 1385, and 1387].) Because the new enactment thus eliminates the problem of a magistrate's lack of authority to dismiss in these circumstances, it fills the void created by Peters where the circumstances occur. It nevertheless does not reach the present case because it comes too late.
(1) The magistrate in this case undertook to resolve the Peters problem by ordering petitioners "discharged," pursuant to section 871, and by complying with the 10-court-day requirement of section 859b in a new action thereupon commenced against them. (See the text at fn. 5, ante.) He thus employed the tactic which was used in Johnson and Simmons, and which has been widely used by magistrates who have improvised it in post-Peters cases involving violations of section 859b. (See Johnson v. Superior Court, supra, 97 Cal. App.3d 682 at pp. 684, 685; Simmons v. Municipal Court, supra, 109 Cal. App.3d 15 at p. 19.)
The Johnson court raised a question concerning the validity of the tactic, but expressly avoided answering it. (See Johnson v. Superior Court, supra, 97 Cal. App.3d 682 at p. 685.) The court held in effect that a defendant who is once denied a prompt preliminary examination, in violation of section 859b, is entitled to dismissal by the superior court, on his motion pursuant to section 995, without regard to the fact that he has actually been held to answer after a timely preliminary examination conducted in a new action commenced after he had been ordered "discharged" by reason of the initial violation. (Id., at p. 686.) The court took pains to observe that dismissal by the superior court would not bar the People from pursuing the prosecution by subsequently filing a new complaint. (Id., at p. 686, fn. 5 [citing § 999; Johnson v. Superior Court (1975) 15 Cal.3d 248, 255 (124 Cal. Rptr. 32, 539 P.2d 792]; People v. Uhlemann (1973) 9 Cal.3d 662, 666 (108 Cal. Rptr. 657, 511 P.2d 609)].)
The Simmons court indorsed the "clear implication" of Johnson that the 10-court-day requirement of section 859b was to be viewed as "relating back to the first arraignment." (Simmons v. Municipal Court, supra, 109 Cal. App.3d 15 at pp. 22-23.) Proceeding on that premise, the court held in effect that a magistrate cannot cure a section 859b violation by ordering the defendant "discharged" pursuant to section 871, and proceeding to conduct a timely preliminary examination in a new action, unless he has fully complied with section 871 in the process: i.e., unless he has ordered the defendant discharged "`after hearing the *437 proofs'" at a late preliminary examination conducted in the original action. (Id., at pp. 25, 27.)
We agree with Simmons on this point. Section 871 does not authorize a magistrate to order a defendant "discharged" without "hearing the proofs" and finding "either that no public offense has been committed or that there is not sufficient cause to believe the defendant guilty of a public offense." (See fn. 5, ante.) No other statute authorizes a "discharge" by a magistrate in any pertinent circumstances. It follows that an order of discharge made by a magistrate is void if he does not follow the procedure required by section 871. A void order may not be validated on the ground that the magistrate made it in a good faith attempt to cope with the problem imposed on him by the Peters decision.
The Simmons court expressly acknowledged that this view of section 871 required what had been styled as a "superfluous procedural step," and a "`sham' preliminary," but attributed the requirement to a "legislative void" created by the "sudden advent of Peters." (Simmons v. Municipal Court, supra, 109 Cal. App.3d 15 at pp. 26-27.) The court also observed that a magistrate's failure to take the step was not fatal to "ultimate resolution" of a prosecution because the inevitable result  dismissal by the superior court  would not bar the People from commencing a new action by filing another complaint at that point. (Id., at pp. 25-27; see also id., at p. 24, fn. 5.)
The "superfluous procedural step" was not taken here, and there was no compliance with section 871 before the magistrate ordered petitioners "discharged." In the circumstances otherwise presented, however, we are not relegated to the circuity of action defined in Simmons as the only route which will permit "ultimate resolution" of the prosecution. Petitioners affirmatively requested the magistrate to "discharge" them by joining in a "motion to dismiss" the action then pending. (See fn. 4, ante.) The motion included the objective of "discharge" by the time the magistrate defined it as a "ten-day motion ... applicable to all defendants." (See ibid.) It is clear from the full context of the motion that petitioners sought their "discharge" pursuant to section 871. The timing of the motion also demonstrates that they requested "discharge" without the presentation of "proofs," and a finding, as required by the statute.
The violation of section 859b in the first action against petitioners (No. 75920 C) did not entitle them to relief in the superior court (1) if *438 that action had been terminated by a valid order of discharge made by the magistrate in compliance with section 871 and (2) if they were given timely preliminary examinations in the second action (No. 76230 C) which was thereupon commenced against them. (Cf. Simmons v. Municipal Court, supra, 109 Cal. App.3d 15 at p. 25.) The second condition was met. The first one was not met because the order of discharge was not made in compliance with section 871.
The order was nevertheless made on petitioners' joint motion as described above. The doctrine of "invited error" therefore operated to estop them from challenging the validity of the order in the superior court. (Jackson v. Superior Court (1937) 10 Cal.2d 350, 358 [74 P.2d 243, 113 A.L.R. 1422]; People v. Delgado (1973) 32 Cal. App.3d 242, 254 [108 Cal. Rptr. 399]; 6 Witkin, Cal. Procedure (2d ed. 1971) Appeal, §§ 266-267, pp. 4257-4258.) The magistrate having had jurisdiction of the "subject matter" of action No. 75920 C, petitioners are thus estopped even if he exceeded his jurisdiction in making the order as such. (In re Griffin (1967) 67 Cal.2d 343, 347-348 [62 Cal. Rptr. 1, 431 P.2d 998]; People v. Davidson (1972) 25 Cal. App.3d 79, 83 [101 Cal. Rptr. 494]; see People v. Chi Ko Wong (1976) 18 Cal.3d 698, 713 [135 Cal. Rptr. 392, 557 P.2d 976]; Klitgaard & Jones, Inc. v. San Diego Coast Regional Com. (1975) 48 Cal. App.3d 99, 111-112 [121 Cal. Rptr. 650]; Witkin, Cal. Criminal Procedure (1978 supp.) § 28A, pp. 48-49.) Respondent court applied this reasoning when it denied their section 995 motion on the ground that they were "estopped from complaining." (See fn. 6, ante.) The order of denial is consequently to be sustained.
The alternative writ of prohibition issued herein on September 3, 1980, is discharged. The petition is denied.
Christian, J., and Poche, J., concurred.
NOTES
[1]  All statutory citations in this opinion are to the Penal Code. The proceedings described were conducted in 1979 and 1980. During those years, section 859b provided in pertinent part as follows: "859b. At the time the defendant appears before the magistrate for arraignment, if the public offense is a felony to which the defendant has not pleaded guilty ..., the magistrate... must set a time for the examination of the case and must allow not less than two days, excluding Sundays and holidays, for the district attorney and the defendant to prepare for the examination....

"Both the defendant and the people have the right to a preliminary examination at the earliest possible time, and unless both waive that right or good cause for a continuance is found as provided for in Section 1050, the preliminary examination shall be held within 10 court days of the date the defendant is arraigned or pleads, whichever occurs later. In no instance shall the preliminary examination be continued beyond 10 court days from such arraignment or plea whenever the defendant is in custody at the time of such arraignment or plea and the defendant does not personally waive his right to preliminary examination within such 10 court days." (Italics added.)
[2]  Section 995 provides in pertinent part: "The indictment or information must be set aside by the court in which the defendant is arraigned, upon his motion, in either of the following cases:... If it be an information: 1. That before the filing thereof the defendant had not been legally committed by a magistrate...."
[3]  Dates mentioned refer to the calendar year 1979 until otherwise indicated.
[4]  The manner in which this motion was made should also be described. Mr. Crofton, counsel for petitioner Lott, moved on his behalf "to dismiss the complaint in this action" on the grounds recited in the text. Miss Marshall, representing petitioner Coleman, announced that she was "joining in that motion" and added that she was asking for her client's "discharge ... because it is well past the ten days." Mr. Moore, counsel for petitioner Moten, joined in "Mr. Crofton's motion for dismissal...." Mr. Broome, representing petitioner Brooks, stated that he joined in "Mr. Crofton [sic] and Miss Marshall's motion." The magistrate summed up by stating, "[s]o that it's simpler, the ten-day motion will be applicable to all defendants."
[5]  Sections 859b and 871 appear in the same chapter, which governs the conduct of preliminary examinations. (Ch. 7 [Examination of the Case, and Discharge of the Defendant, or Holding Him to Answer, commencing with § 858] of tit. 3 of pt. 2 of the Pen. Code.) During 1979 and 1980, section 871 provided as follows: "871. If, after hearing the proofs, it appears either that no public offense has been committed or that there is not sufficient cause to believe the defendant guilty of a public offense, the magistrate must order the defendant to be discharged, by an indorsement on the depositions and statement, signed by him, to the following effect: `There being no sufficient cause to believe the within named A.B. guilty of the offense within mentioned, I order him to be discharged.'"
[6]  This exchange concluded as follows: "MISS MARSHALL [defense counsel]: ... The Johnson case still remains collectively on point.... You may argue ... about the rationale of the holding, but that is the most recent holding of the Court of Appeal.

"THE COURT: Fine, and I'm not following it.... I'm saying I'm ruling [that] where the defense has asked to have a preliminary and a proceeding terminated before the Municipal Court on the ground that ... the hearing was not completed within ten days and that motion was granted, then the People can recommence their action. And, I say, you are estopped from complaining.... That's my ruling."
