In all cases where a tenant or tenants become insolvent, and any assignment for the benefit of creditors is executed, or a receiver is legally appointed for, or bankruptcy or other insolvency proceedings are instituted either by or against the tenant or tenants, covering goods and chattels upon demised premises and which are liable to distress by the landlord for rent, the landlord shall be first entitled to receive out of the proceeds of the sale of such goods and chattels by the legal representatives of the tenant any sum or sums of money due the landlord for rent of such demised premises at the time of the institution of the receivership or insolvency proceedings, not exceeding one year's rent: Provided, That if the proceeds of the sale by the legal representatives of the tenant shall not be sufficient to pay the landlord and the costs of the insolvency proceedings, the landlord shall be entitled to receive the proceeds of sale after deducting so much for costs as the landlord would be liable to pay in case of a sale under distress. Nothing in this act shall be construed to deprive any person of preference for wages now secured by law in any insolvency or receivership proceedings.
39 P.S. § 96