Under a contract with appellant the respondent did, and caused to be done, the work of painting a building and other structures situated on a parcel of land, the property of appellant, in the city and county of San Francisco. The work was completed March 9, 1891. For this appellant owed respondent $703, of which sum $345 was paid; and respondent brought this action to enforce a lien asserted by him against the premises where the work was done for the unpaid balance of $358. His complaint contains an allegation that an amount specified is a reasonable allowance for attorney’s fees in the action, which averment defendant denied; the court made no finding on this issue.
Respondent sublet a portion of the work to one Sta*274pleton, agreeing to pay Mm therefor the sum of $100 After the entire job was completed respondent gave to Stapleton a written, order on appellant requesting the latter to pay Stapleton such sum of $100 out of the contract price then due respondent, but appellant refused to pay such order on presentation thereof. Stapleton filed in the recorder’s office a claim ef lien against the property for the amount due him from respondent; and, after appellant’s refusal to pay said order, commenced an action to foreclose the lien, in which suit Clancy and Plover, the parties here, were made defendants; Plover, the owner, contested the case, but Clancy made default. Stapleton recovered judgment in that action for said sum of $100, together with $3.25, cost of recording his claim of lien, $50 attorney’s fees, and $75.50, costs of suit—in all $228.75, to satisfy which Plover’s premises were ordered to be sold; Plover then paid the amount of that judgment, and claimed credit in the present action for the whole of the sum so paid. But the court below allowed him credit for only $100, the amount of Stapleton’s original demand, and rendered judgment in respondent’s favor for $258, together with costs, and $40 for attorney’s fees. Plover appeals from the judgment and an order denying a motion for new trial.
1. It has been established by the decisions of this court that no allegation need be inserted in a complaint for the foreclosure of a mechanic’s lien relative to the claim of the plaintiff for attorney’s fees; that an allegation on that subject if made does not bind even the party making it. (Mulcahy v. Buckley, 100 Cal. 490; Pacific Mut. Life Ins. Co. v. Fisher, 106 Cal. 224.) Therefore, the issue made by the pleadings here on that question was immaterial, and the failure of the court to find upon the same was not error.
It is said that there was no evidence before the court as to the value of respondent’s counsel fee. Since the above-cited cases determine that the attorney’s fee is to be fixed by the court, irrespective of any averment in the complaint, and that such averment is immaterial, it *275is not perceived why the plaintiff must necessarily prove what he need not allege; the court is not bound by testimony touching the value of attorneys’ fees in suits of this nature; the limitation on its action being that it shall not abuse the discretion committed to it by the statute (Code Civ. Proc., sec. 1195); we think, therefore, that the failure of the plaintiff to produce evidence on that question does not affect the validity of the judgment awarding such fees. (See the opinion of Harrison, J., in Watson v. Sutro, 103 Cal. 172; Rapp v. Spring Valley Gold Co., 74 Cal. 532.) No doubt such evidence is admissible and may properly be considered by the court, but its absence in the record on appeal is not a circumstance requiring a reversal, unless it should appear from an inspection of the record, and without evidence to sustain it, that the fee fixed by the court is unreasonable; which is not claimed in this instance.
2. It was the duty of the respondent to protect the appellant’s property against any lien preferred by subcontractors, laborers, or materialmen employed by him. (Code Civ. Proc., sec. 1193.) Under the same section the owner was entitled to deduct from any amount due to respondent the amount of the Stapleton judgment and costs; and this, of course, includes the attorney’s fees recovered by Stapleton. Respondent could have prevented the accumulation of such expenses by the simple expedient of paying the sum due to Stapleton; it was his debt, and not appellant’s. (Covell v. Washburn, 91 Cal. 560.)
It does not affect the case that an order was given upon appellant for the amount of Stapleton’s claim before that action was begun, and that he refused payment of the order. The respondent could not split his demand, and by assignment of a portion thereof impose upon appellant without his consent the legal obligation of paying the assignee. (Thomas v. Rock Island G. & S. M. Co., 54 Cal. 578; Grain v. Aldrich, 38 Cal. 514; 99 Am. Dec. 423.) Respondent refers us to Adams v. Burbank, 103 Cal. 646. But that case differed from this in *276the important feature that there the owner had promised to pay the contractor’s orders and wrongfully violated his agreement, while here there was no such promise.
It results that the judgment must he modified as of the date of its entry by striking therefrom the sum of $128.75, the excess of Stapleton’s judgment paid by appellant above the sum allowed as a credit to appellant in this action, and, as so modified, the judgment and the order denying a new trial should be affirmed.
Vanclief, C., and Belcher, C., concurred.
For the reasons given in the foregoing opinion the judgment is modified by striking therefrom the sum of $128.75, as of the date of entry thereof, and as so modified the judgment and the order denying a new trial are affirmed.
McFarland, J., Temple, J., Henshaw, J.