
528 So.2d 163 (1988)
STATE of Louisiana, Plaintiff-Appellee,
v.
Enrique RIOS and Jesus P. Vasquez, Defendants-Appellants.
No. CR 87-927.
Court of Appeal of Louisiana, Third Circuit.
March 2, 1988.
On Rehearing June 15, 1988.
Writ Denied September 9, 1988.
*164 Michael Bride, Lake Charles, for Vasquez.
*165 Ron Ware, Lake Charles, for Rios.
Richard Ieyoub, Dist. Atty., Lake Charles, for State of La.
Before GUIDRY, YELVERTON and KNOLL, JJ.
KNOLL, Judge.
Enrique Rios and Jesus P. Vasquez (hereafter defendants) appeal their convictions for possession of cocaine in excess of 200 grams but less than 400 grams, violations of LSA-R.S. 40:967 F(2). Defendants were originally charged with possession of 400 or more grams of cocaine, a violation of R.S. 40:967 F(3), but pursuant to a plea bargain they pleaded guilty to the mid-grade possession charge, and reserved their right to appeal the trial court's denial of their motion to suppress. See State v. Crosby, 338 So.2d 584 (La.1976). Defendants were each sentenced to serve 10 years with the Department of Corrections without benefit of parole, probation or suspension of sentence, fined $100,000 and in default of payment of the fine to serve 12 months in the parish jail. Defendants contend on appeal that the trial court erred: 1) in taking judicial notice at the suppression hearing of the testimony two of the State's witnesses gave on defendants' motion for preliminary examination; 2) in failing to grant defendants' motion to suppress; and 3) in imposing an alternative jail sentence in lieu of payment of fine and court costs where defendants are indigent. We amend and affirm.

FACTS
On February 26, 1987, defendant Vasquez was driving a vehicle westbound on I-10 just west of Iowa, Louisiana. Defendant Rios was a passenger. After Trooper Charles Jones clocked Vasquez travelling 76.2 m.p.h. in a 55 m.p.h. zone, Lt. Joseph Valenti, who was assisting Trooper Jones, stopped defendants for speeding. Within a few minutes Trooper Jones joined Lt. Valenti at the scene.
Vasquez, the driver, went to Trooper Jones' vehicle for issuance of the traffic citation and, for the officers' protection, Rios joined Lt. Valenti at the rear of Valenti's vehicle. While Trooper Jones was issuing the citation for speeding to defendant Vasquez, Lt. Valenti separately asked defendants a few questions. Because defendants made contradictory statements to Lt. Valenti as to where they were coming from, Lt. Valenti read defendants their Miranda rights and requested permission from Vasquez to search the vehicle. Defendant Vasquez verbally consented to a search of the vehicle.
While Lt. Valenti waited for defendant Vasquez to pull the trunk release from the interior of the vehicle, Trooper Jones stood on the passenger side as defendant Rios obtained the registration papers from the glove compartment. While defendants were inside the vehicle, Trooper Jones observed both of them trying to move something from the driver's side. Fearing for his safety, Trooper Jones pulled defendant Rios out of the way and discovered a plastic bag in plain view containing a green vegetable-like substance.
Lt. Valenti had opened the trunk and lifted it approximately a foot when Trooper Jones discovered the plastic bag. Lt. Valenti shut the trunk without conducting a search, placed defendants under arrest for possession of narcotics, transported them to Troop D, and impounded the vehicle.
Sgt. Jerome Sigur and other narcotics officers searched the impounded vehicle at police headquarters and seized 878.7 grams of cocaine.

MOTION TO SUPPRESS
For an accused to invoke the rule excluding evidence obtained by an alleged illegal search and seizure it is necessary for him to file a pre-trial motion to suppress the evidence under LSA-C.Cr.P. Art. 703, and the failure to do so, in the absence of a showing of surprise or lack of opportunity to file such a motion, operates as a waiver of any claimed violation of constitutional rights against searches and seizures. State v. Jenkins, 340 So.2d 157 (La.1976).
The record shows that the only defendant who filed a motion to suppress was Rios. Therefore, although Vasquez argues *166 in brief that the trial court erred in failing to suppress the cocaine seized, he never filed a motion to suppress. Vasquez neither established surprise nor lack of opportunity to file such motion. Under these circumstances, Vasquez cannot complain of an unconstitutional search, if any existed, and the trial court's use of testimony by judicial notice at Rios' suppression hearing.

JUDICIAL NOTICE OF TESTIMONY
Defendant Rios contends that at the hearing on his motion to suppress the trial court erred in taking judicial notice of testimony Lt. Valenti and Sgt. Sigur gave at defendants' preliminary examination. Lt. Valenti and Sgt. Sigur testified at defendants' preliminary examination which was held immediately before the hearing on the motion to suppress. At the State's request, the trial court took judicial notice at the suppression hearing of the officers' earlier testimony regarding Vasquez's consent to search and the search of the impounded vehicle, and did not require them to take the stand for the suppression hearing. Defense counsel timely objected to the trial court's action.
A judgment or ruling shall not be reversed by an appellate court because of any error, defect, irregularity, or variance which does not affect substantial rights of the accused. LSA-C.Cr.P. Art. 921. Even when error is committed, if an appellate court finds beyond a reasonable doubt that error was harmless in light of the total circumstances, defendant's conviction will not be overturned. State v. Humphrey, 412 So.2d 507 (La.1982).
Considering the record before us, assuming arguendo that the trial court erred in taking judicial notice of the officers' prior testimony, defendant Rios has not established that the trial court's use of judicial notice prejudiced him in any way. The record reflects that at the hearing on the preliminary examinations the State questioned Lt. Valenti extensively about Vasquez's consent to search and elicited comprehensive testimony from Sgt. Sigur relative to the search he conducted of the impounded vehicle. Furthermore, defendant thoroughly cross-examined both witnesses on these issues.
Defendant's assignment of error is without merit.

SEARCH AND SEIZURE
Defendant Rios contends that the cocaine found during the search of the trunk of the automobile Vasquez was driving should have been suppressed since there was no search warrant. He further contends the State failed to affirmatively establish that Vasquez consented to the search.
Since defendant Rios was neither the owner nor the driver of the vehicle searched, we must first determine whether he has standing to question defendant Vasquez's consent to search the automobile. LSA-Const. Art. 1, Sec. 5 provides "any person adversely affected by a search or seizure conducted in violation of this section shall have standing to raise its illegality in the appropriate court." Therefore, since defendant Rios is adversely affected by Vasquez's consent, he has standing to raise the voluntariness of the consent. See State v. Owen, 453 So.2d 1202 (La.1984).
A search conducted with the consent of a defendant is an exception to the warrant and probable cause requirements of the law. State v. Tennant, 352 So.2d 629 (La.1977), cert. den., 435 U.S. 945, 98 S.Ct. 1529, 55 L.Ed.2d 543 (1978). LSA-C. Cr.P. Art. 703 requires that the State has the burden of proving the admissibility of any evidence seized without a warrant. State v. Price, 495 So.2d 389 (La.App. 3rd Cir.1986), writ denied, 499 So.2d 84 (La. 1987). The trial court determines the voluntariness of consent, on a case by case basis, as a question of fact and, as such, an appellate court should not overturn the trial court's conclusion in the absence of palpable abuse of discretion. State v. Tennant, supra. An oral consent to search is sufficient; a written consent is not required. State v. Ossey, 446 So.2d 280 (La. 1984), cert. denied, 469 U.S. 916, 105 S.Ct. 293, 83 L.Ed.2d 228 (1984).
*167 Defendants were stopped on I-10 just west of Iowa, Louisiana for traveling 76.2 m.p.h. in a 55 m.p.h. zone. In explanation of why Lt. Valenti asked for consent to search the car, he stated:
"I asked Mr. Rios: Where were ya'll coming from? And he said Miami. He said they had been down there to possibly open up a new shop. They were mechanics, or did something to windows, and paint jobs, or what have you. So, I then walked back to Mr. Vasquez, and asked him where he had been coming from. Mr. Vasquez advised me at that time that he was coming from New Orleans. I then asked: Have you ever been to Miami recently? And he paused, and he waited awhile, and then he finally answered, yes, he had been down there to visit friends. I then walked back to Mr. Rios, and asked him where they had been at the whole time, and he says, we had been driving the whole way. And I said, that's a long drive. He says, but we've been switching drivers off and on, driving the whole way. And I asked him: You never stopped anywhere like Birmingham, Alabama, Lafayette, and anywhere to get any kind of sleep? and he says, no they were driving straight on through. So, I walked back to Mr. Vasquez, and I asked Mr. Vasquez: Where in New orleans [sic] did you stay? And he says, we stayed at the Howard Johnson's. At that point I advised Mr. Vasquez of his rights. I told him between him and Mr. Rios, they were not telling me a proper story. I believed there was something wrong with their statement. I asked him permission to search his vehicle. I advised him of his rights, and told him that he did not have to allow me to search his vehicle, and at any time he wished, he could stop me from searching the vehicle. He advised me verbally that he did not mind me searching the vehicle."
The record is clear that Vasquez consented to the search, and establishes that Vasquez himself opened the locked trunk. See State v. Ketton, 468 So.2d 707 (La.App. 4th Cir.1985). Moreover, even though Vasquez was advised of his right to withdraw his consent, there is no evidence that Vasquez's consent to search was ever withdrawn. During the motion to suppress defendant Rios offered no evidence to contradict Lt. Valenti's testimony. Therefore, we find the State carried its burden of proving that Vasquez's consent at the scene of the stop extended to the later search conducted at police headquarters.
Defendant's assignment of error lacks merit.

IMPRISONMENT IN LIEU OF FINE
Finally defendants contend the trial court erred in imposing an alternative jail sentence in lieu of payment of a fine and court costs because of their indigency.
The necessity of appointing counsel from the Office of the Public Defender to represent a defendant establishes indigency. State v. Williams, 288 So.2d 319 (La. 1974). Defendants were represented by the Public Defenders' Office. Williams' rationale is therefore applicable to them.
LSA-C.Cr.P. Art. 884 provides in pertinent part, "If a sentence imposed includes a fine or costs, the sentence shall provide that in default of payment thereof the defendant shall be imprisoned for a specified period not to exceed one year;..." Nonetheless, it is also a well settled rule that an indigent criminal defendant may not be imprisoned in default of payment of a fine beyond the maximum authorized by the statute regulating the substantive offense. Williams v. Illinois, 399 U.S. 235, 90 S.Ct. 2018, 26 L.Ed.2d 586 (1970). In the case sub judice, even if defendants were unable to pay the $100,000 because of their indigency and were required to serve the 12 months in the parish jail, their prison terms would not exceed the 30 year maximum authorized by R.S. 40:967 F(2).
However, we note that in State v. Leblanc, 517 So.2d 951 (La.App. 3rd Cir.1987), a case in which an indigent defendant was given a jail sentence if he could not pay his fine, and the total jail sentence, inclusive of the in lieu jail time, did not exceed the maximum provided by statute, we deleted *168 that portion of defendant's sentence which required an additional year imprisonment if he defaulted on paying the $5,000 fine. We explained:
"While the issue at bar has never been discussed at length by the Louisiana Supreme Court, the court has recently granted writs of review to numerous cases in which indigent defendants were appealing their sentences which included a fine and/or costs and, in default of payment, imposed an additional term of imprisonment. State v. Grant, 490 So.2d 272 (La.1986). See State v. Barlow, 488 So.2d 180 (La.1986); State v. Bartie, 488 So.2d 180 (La.1986); State v. Pinkney, 488 So.2d 682 (La.1986). State v. Williams, 484 So.2d 662 (La.1986); State v. Garrett, 484 So.2d 662 (La.1986). In each decision the court summarily affirmed the convictions but amended the sentences to delete that portion which imposed additional imprisonment in default of payment of a fine or costs and cited Williams v. Illinois, supra; Morris v. Schoonfield, 399 U.S. 508, 90 S.Ct. 2232, 26 L.Ed.2d 773 (1970); Tate v. Short, 401 U.S. 395, 91 S.Ct. 668, 28 L.Ed.2d 130 (1971); Bearden v. Georgia, 461 U.S. 660, 103 S.Ct. 2064, 76 L.Ed.2d 221 (1983) to support their holding."
See also State v. Smith, 509 So.2d 805 (La.App. 1st Cir.1987).
Since the Louisiana Supreme Court has evidently determined that an additional jail term imposed on an indigent defendant in default of payment of a fine is an illegal sentence, we are constrained to conclude that defendants' argument has merit. Therefore we amend defendants' sentences to delete that portion which imposes a term of imprisonment in default of payment of the fine. In all other respects their sentences are affirmed.

DECREE
For the foregoing reasons, the convictions of Jesus Vasquez and Enrique Rios are affirmed. However, that portion of their sentences which imposed a term of imprisonment in default of payment of the fine is deleted.
JESUS VASQUEZ'S AND ENRIQUE RIOS'S CONVICTIONS ARE AFFIRMED; VASQUEZ'S AND RIOS'S SENTENCES ARE AMENDED AND AFFIRMED.

ON REHEARING
PER CURIAM.
We granted a rehearing for the limited purpose of considering Jesus P. Vasquez's motion to suppress evidence which he alleged was obtained by an illegal search and seizure. We stated in our original opinion at page 3 that we could not consider Vasquez's argument because he had not filed a motion to suppress. In an application for rehearing, Vasquez has attached a certified copy of his motion to suppress which was inadvertently excluded from the appellate record. We have now reviewed his motion to suppress, and find that a rehearing is unnecessary. Although we have now concluded that Vasquez did have standing to question the trial court's denial of his motion to suppress, we have concluded that the reasoning assigned in our original opinion regarding Enrique Rios' motion to suppress is also dispositive of Vasquez's motion.
