Every attornment by a tenant of real estate to a stranger to the title to the leased real estate shall be absolutely null and void, to all intents and purposes whatsoever, and the possession of the landlord or lessor shall not, by any such attornment, be in any way changed, altered or affected. This section shall have no application to an attornment made pursuant to or in consequence of a judgment at law or a decree or order of a court of equity, or to an attornment made with the privity and consent of the landlord or lessor, or to an attornment to a mortgagee after the mortgage has become forfeited.
N.J.S. § 46:8-1