
59 P.3d 308 (2002)
138 Idaho 137
James L. TAYLOR, Plaintiff-Respondent-Cross-Appellant,
v.
Charles C. JUST, in his capacity as Trustee; Fairbanks Capital Corporation, a Utah corporation; Ronald Dale Rush and Terilyn Ann Rush, husband and wife, Defendants-Appellants-Cross-Respondents.
No. 28105.
Supreme Court of Idaho, Boise, November 2002 Term.
November 22, 2002.
*309 Mark L. Clark, Nampa, for appellants.
White Peterson Morrow Gigray Rossman Nye & Rossman, Nampa, for respondent. Kevin E. Dinius argued.
EISMANN, Justice.
This is an appeal from a judgment ordering the trustee under a deed of trust to execute and deliver a trustee's deed to the highest bidder at the foreclosure sale. Prior to the sale, the grantor and beneficiary had entered into an agreement resolving the default. Therefore, we reverse the judgment of the district court because the sale was void and the trustee cannot be required to execute and deliver a trust deed.

I. FACTS AND PROCEDURAL HISTORY
In April 1998, Ronald and Terilyn Rush executed a deed of trust on their residence to secure payment of a promissory note in the sum of $37,000. The defendant Fairbanks Capital Corporation (Fairbanks Capital) later *310 acquired the interest of the beneficiary under that deed of trust. The Rushes failed to make the monthly payments that came due under the promissory note for the months of November 2000 through February 2001. Fairbanks Capital retained the defendant Charles Just (the Trustee) to foreclose the deed of trust by nonjudicial sale, and he commenced foreclosure proceedings under Idaho Code § 45-1506, with the sale scheduled for July 19, 2001. The Trustee retained Pioneer Title Company (Pioneer Title) to conduct the sale.
On July 17, 2001, the Rushes and Fairbanks Capital executed a contract entitled "Forbearance Agreement" (Agreement) which addressed the Rushes' default. The Agreement altered the terms of the promissory note by modifying the payments due. As modified by the Agreement, the Rushes were to pay $2,000 on July 17, 2001; $575 by the seventeenth days of August, September, and October 2001; and $4,984 by November 17, 2001. The Agreement provided that if the Rushes made the payments as modified, Fairbanks Capital would not proceed with the foreclosure. The Rushes timely paid the $2,000, and Fairbanks Capital sent the Trustee an e-mail instructing him to stop the foreclosure proceedings. Because of a problem with the Trustee's Internet provider, however, he did not receive the e-mail until July 20, 2001, the day after the sale.
Pioneer Title held the foreclosure sale as scheduled on July 19, 2001. The plaintiff James Taylor (Taylor) was the highest bidder, and on the same day he tendered to Pioneer Title a certified check for the full amount of his bid. On July 20, 2001, the Trustee received the e-mail message from Fairbanks Capital. On July 23, 2001, the Trustee informed Taylor about the Agreement and told him he would not be receiving a trustee's deed. Taylor's check was returned to him.
On August 22, 2001, Taylor commenced this action. In count one of his complaint he requested a declaratory judgment that he is the legal owner of the real property. In count two, he alleged that the Trustee and Fairbanks Capital had breached a contract to convey the real property to him, and he sought either specific performance of that contract or damages for its breach. He alleged that the damages recoverable were $47,215, the difference between the price he bid and the fair market value of the real property.
The parties filed cross motions for summary judgment, which were heard on December 14, 2001. The district court ruled that the Agreement did not cure the default, it was simply a promise to cure the default, and that as a result the sale was valid. The district court therefore ruled that the sale was valid and that the Trustee was required to execute and deliver the trustee's deed to Taylor. The court granted summary judgment in favor of Taylor on count one of his complaint. With respect to count two, the district court stated that a breach of contract cause of action would not lie under the facts of this case. It also denied respondents' motion for summary judgment. The district court entered a judgment ordering the Trustee to execute and deliver the trustee's deed to Taylor. The respondents then appealed, and Taylor cross-appealed.

II. ISSUES ON APPEAL
A. Was the foreclosure sale void?
B. Is Taylor a good faith purchaser under Idaho Code § 45-1508?
C. Did the district court err in not granting Taylor summary judgment on his claim for breach of contract?
D. Did the district court err in awarding Taylor attorney fees?
E. Is either the Trustee or Taylor entitled to attorney fees on appeal?

III. ANALYSIS
In an appeal from an order of summary judgment, this Court's standard of review is the same as the standard used by the trial court in ruling on a motion for summary judgment. Infanger v. City of Salmon, 137 Idaho 45, 44 P.3d 1100 (2002). All disputed facts are to be construed liberally in favor of the non-moving party, and all reasonable inferences that can be drawn from the record are to be drawn in favor of the non-moving *311 party. Id. Summary judgment is appropriate if the pleadings, depositions, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law. Id. If the evidence reveals no disputed issues of material fact, then only a question of law remains, over which this Court exercises free review. Id.

A. Was the Foreclosure Sale Void?
Idaho Code § 45-1505(2) (1997) grants authority to foreclose a deed of trust by nonjudicial sale. It provides, "The trustee may foreclose a trust deed by advertisement and sale under this act if ... [t]here is a default by the grantor ... owing an obligation the performance of which is secured by the trust deed." The statute requires that the default exist at the time of the sale. It states that the trustee may foreclose a trust deed if there "is" a default by the grantor, not if there "has been" a default by the grantor. Both parties agree that if the promissory note was not in default on July 19, 2001, the foreclosure sale was void. The issue in this case is whether there was still a default after the Rushes and Fairbanks Capital had entered into the Agreement. The district court held that the Agreement "amounts to a promise to cure a default and ... it does not cure the default." In so holding, the district court erred.
A contract must be construed to give effect to the intention of the parties. Wing v. Martin, 107 Idaho 267, 688 P.2d 1172 (1984). In order to ascertain that intent, the contract must be construed as a whole. Id. If a contract's terms are clear and unambiguous, the contract's meaning and legal effect are questions of law, and the meaning of the contract and intent of the parties must be determined from the plain meaning of the contract's own words. Taylor v. Browning, 129 Idaho 483, 927 P.2d 873 (1996).
The Agreement expressly modified the payments due under the promissory note. It recited, "Whereas Borrower(s) and Lender are willing to modify the note as set forth below in order to permit Borrower(s) to continue to own and use the property." The parties agreed that the amounts due under the note, including various fees and costs relating to the foreclosure proceedings, totaled $6,984.38. They then agreed as follows:
2. Forbearance. From and after the date of execution of this agreement, during the term hereof, so long as Borrower(s) does not default in any performance required by this Agreement and does not default in any performance required by the Note (except as modified by this Agreement) and Mortgage lender agrees to forbear from scheduling a sheriffs sale, and to forbear from proceeding with the filing of a Foreclosure.
3. Duties of Borrower(s). Borrower(s) shall make the following payments at the following times:
A) On or before the earlier of July 17, 2001 or the date of execution of this agreement, Borrower(s) shall pay $2000.00 to Lender.
B) Thereafter Borrower(s) shall make monthly payments to Lender in the amount of $575.00 for the months of August 2001 through and including October 2001 provided that payments shall be received by Lender no later than the 17th day of each of these months. A final balloon payment to reinstate loan is due on or before November 17, 2001 in amount of $4984.28.
4. Effect of Default. Should Borrower(s) fail to make any payment required by this Agreement or perform any other act required by this Agreement or should any representation or warranty given by Borrower(s) be untrue or shall be breached, Lender shall have the right to pursue all remedies available to it under the Note, Mortgage and/or Final Judgment. In executing this agreement, Borrower(s) specifically acknowledges that the Notice of Default shall not be rescinded and shall be an instrument of record until withdrawn by Lender.
The Agreement also provided, "Except as specifically modified by this Agreement, all other terms of the Note shall remain unchanged from the original terms and no part of the Mortgage is modified by this Agreement." *312 The Rushes paid the $2,000 due upon execution of the Agreement.
The Agreement clearly provided: (1) that the terms of the promissory note were modified so that there were no longer any sums that were past due; (2) that Fairbanks Capital could not proceed with foreclosing the deed of trust unless there was a new default in the Agreement or in the promissory note; and (3) that if there was a future default then Fairbanks Capital could pursue all remedies available to it. Thus, the Agreement by its terms cured the default because under the Agreement, there were no longer any sums past due. Under its terms, it would require a new default by the Rushes for Fairbanks Capital to be able to foreclose the deed of trust.
Idaho Code § 45-1506 (1997) provides that the trustee can postpone the sale at the request of the beneficiary. Thus, the beneficiary could agree to postpone the sale to give the grantor additional time to cure the default. That is not what happened here, however. The Agreement did not merely provide that the sale would be postponed. It eliminated the default by altering the terms of the promissory note so that there were no longer any sums past due.
Taylor points to one sentence in the Agreement which he contends shows that the default was not cured. That sentence states, "In executing this agreement, Borrower(s) specifically acknowledges that the Notice of Default shall not be rescinded and shall be an instrument of record until withdrawn by Lender." This sentence does not provide that the default is not cured. It simply provides that the notice of default will remain filed. Fairbanks Capital may have included this provision in the Agreement under the belief that if there were a future default, Fairbanks Capital could short-circuit the foreclosure process by relying upon the prior notice of default. Whatever the reason behind this provision, its terms do not contradict the fact that upon the execution of the Agreement, there were no longer any sums past due under the promissory note as it had been modified by the Agreement. Thus, because at the time of the sale on July 19, 2001, there was no default in the performance of any obligations secured by the deed of trust, the foreclosure sale was void.
Taylor also argues that the default could not be cured without actual payment of the entire amount then due under the terms of the deed of trust and promissory note, including a reasonable trustee's fee and attorney fees. Taylor relies upon Idaho Code § 45-1506(12) in making this argument. That code section gives the grantor the right to cure a default by paying those sums within 115 days after the recording of the notice of default. The statute simply grants a right to cure within 115 days after the recording of the notice of default and specifies how a grantor can exercise that right. It does not purport to limit the right of the grantor and beneficiary to come to their own agreement to cure a default.

B. Is Taylor a Good Faith Purchaser Under Idaho Code § 45-1508?
Taylor argues that he is entitled to a deed to the real property because he is a good faith purchaser under Idaho Code § 45-1508 (1997), which provides:
A sale made by a trustee under this act shall foreclose and terminate all interest in the property covered by the trust deed of all persons to whom notice is given under section 45-1506, Idaho Code, and of any other person claiming by, through or under such persons and such persons shall have no right to redeem the property from the purchaser at the trustee's sale. The failure to give notice to any of such persons by mailing, personal service, posting or publication in accordance with section 45-1506, Idaho Code, shall not affect the validity of the sale as to persons so notified nor as to any such persons having actual knowledge of the sale. Furthermore, any failure to comply with the provisions of section 45-1506, Idaho Code, shall not affect the validity of a sale in favor of a purchaser in good faith for value at or after such sale, or any successor in interest thereof.
That statute has no application in this case for two reasons.
*313 First, by its terms it only applies to sales challenged because of a failure to comply with the provisions of Idaho Code § 45-1506. In this case, the Rushes have not contended that the foreclosure sale was void for failure to comply with Idaho Code § 45-1506. They have contended, and we have found, that the foreclosure sale was void for failure to comply with Idaho Code § 45-1505(2), which requires that there be a default in order to sell the real property secured by a deed of trust.
Second, Taylor is not a good faith purchaser for value because he did not acquire title to the real property. The trustee refused to execute and deliver a deed. The doctrine of good faith purchaser for value is available to protect title obtained, not to acquire title. As this Court explained in Ewald v. Hufton, 31 Idaho 373, 380, 173 P. 247, 247-48 (1918):
The doctrine of bona fide purchaser is peculiarly available for purposes of defense. (See the discussion in 2 Pomeroy, Equity Jurisdiction, § 735, et seq.) This defense can be maintained only in favor of a title, though it may be defective, which a bona fide purchaser has, and it is not available for the purpose of creating a title. This view is well expressed by Mr. Justice Bean in the case of Allen v. Ayer, 26 Or. 589, 39 Pac. 1 [(1895)], as follows:
"Where the title to land passes, though obtained by fraud, and the deed is therefore voidable, one who purchases from the grantee in good faith, and without notice, will be protected, because he had a title which he could and did convey, but when the deed was never in fact delivered, the grantee can convey no title for the protection of which the plea of a bona fide purchaser can be invoked."
Thus, Taylor is not entitled to obtain a deed to the real property based upon his contention that he is a good faith purchaser for value.

C. Did the District Court Err in Not Granting Taylor Summary Judgment on His Claim for Breach of Contract?
Taylor contends that even if the foreclosure sale is void, the facts in this case gave rise to a contract between him and either Fairbanks Capital or the Trustee, and he is entitled either to enforce that contract either by requiring the Trustee to execute and deliver a deed to the real property or by recovering damages. Because the foreclosure sale is void, the alleged contract is likewise void. The alleged contract would circumvent the statutory requirement, discussed above, that a deed of trust can be foreclosed only if there is a default in an obligation the performance of which is secured by the deed of trust. A void contract cannot be enforced. Quiring v. Quiring, 130 Idaho 560, 944 P.2d 695 (1997).

D. Did the District Court Err in Awarding Taylor Attorney Fees?
The district court awarded Taylor attorney fees in the sum of $8,842.50 against the Trustee. The district court found that the gravaman of this case involved a commercial transaction, and so the prevailing party was entitled to an award of attorney fees under Idaho Code § 12-120(3). Because we reverse the judgment of the district court, we also reverse the attorney fee award to Taylor.

E. Is Either the Trustee or Taylor Entitled to Attorney Fees on Appeal?
The Trustee and Taylor both seek an award of attorney fees on appeal pursuant to Idaho Code § 12-120(3). That statute provides, "In any civil action to recover ... in any commercial transaction unless otherwise provided by law, the prevailing party shall be allowed a reasonable attorney's fee to be set by the court, to be taxed and collected as costs." The statute defines the term "commercial transaction" to mean "all transactions except transactions for personal or household purposes." IDAHO CODE § 12-120(3) (1998). Both Taylor and the Trustee agree that Taylor's action against the Trustee was to recover in a commercial transaction. Taylor bid at the foreclosure sale in order to obtain the real property for resale. As the prevailing party on the appeal, the Trustee is entitled to an award of a reasonable attorney fee under Idaho Code § 12-120(3). Hoffer v. Callister, 137 Idaho 291, 47 P.3d 1261 (2002). The Trustee is *314 likewise entitled to an award of a reasonable attorney fee in the district court.

IV. CONCLUSION
We reverse the judgment of the district court and remand this case with instructions to enter a judgment dismissing the complaint with prejudice and to award the Trustee a reasonable attorney fee. We also award costs and attorney fees on appeal to the Trustee.
Chief Justice TROUT, and Justices SCHROEDER, WALTERS, and KIDWELL concur.
