The attornment of a tenant to a stranger is void, unless it is made with the consent of the landlord, or in consequence of a judgment of a Court of competent jurisdiction.
(Enacted 1872.)