All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Perhaps you mean the statement of Ibn Abi Zayd al-Qayrawaani in his Risaalah: βAny invalid sale is guaranteed by the seller. If the buyer has already taken possession of the goods, then the buyer guarantees the goods from the day he took possession of them. If their price changes or if the state of the goods changes [i.e. deteriorates by becoming rotten, spoiled, deficient, faulty, broken, etc.], then the buyer must guarantee their value (qeemah) on the day that he took possession of them, and he does not return them.β
This means that the invalid sale does not transfer ownership, and the seller continues to guarantee the goods. However, if the buyer already took possession of the goods and the state of the goods changes while they are in his hands, then he (the buyer) guarantees the value of the goods (on the day that he took possession of them) and does not return the very goods because their state has changed. Rather, he returns the value (of the goods) if they do not have an equivalent that can be measured, weighed or counted; if they do have an equivalent, then in this case, he returns their equivalent (the like of the goods). Also, the change in the market value of the goods is taken into consideration, and that is why he said that he does not return them but rather returns their value.
Al-Abiyy Al-Azhari said in Ath-Thamar Ad-Daani βala Ar-Risaalah:
βWhere the buyer guarantees the goods, this applies from the day that he took possession of them, and not from the day that he concluded the sale contract. He only guarantees them from the day of the contract if it is valid. But in case of an invalid contract, then if the value of the goods changes, regardless of whether it increases or decreases, or if the goods have changed in their state, by an increase or decrease, then if this is something that can be valued, then he has to give their value on the day that he took possession of them, no matter how high it is (even it were more than its purchase price), and not on the day that their value has changed or the day when the ruling was issued. He does not return the goods, meaning that he is not obliged to return the goods if they still exist; and if it is something that can be measured, weighed or counted, then he returns the like of it, and if it is not possible to return the like of it, then he returns its value, such as in case of dates that have gone bad."
Allaah knows best.