§ 15. Validation of official acts performed before filing official oath or undertaking. If a public officer, duly chosen, has heretofore entered, or shall hereafter enter on the performance of the duties of his or her office, without taking or filing an official oath, or executing or filing an official undertaking, as required by the constitution, section ten of this article, section twenty-five of the town law or section one hundred four of the uniform justice court act, or by any general or special law, his or her acts as such officer, so performed, shall be as valid and of as full force and effect as if such oath had been duly taken and filed, and as if such undertaking had been duly executed and filed, notwithstanding the provisions of any general or special law declaring any such office vacant, or authorizing it to be declared vacant, or to be filled as in case of vacancy, or imposing any other forfeiture or penalty for omission to take or file any such oath, or to execute or file any such undertaking; but this section shall not otherwise affect any provision of any general or special law, declaring any such office vacant, or authorizing it to be declared vacant, or to be filled as in case of vacancy, or imposing any other forfeiture or penalty, by reason of the failure to take or file any such oath or to execute or file any such undertaking; and this section shall not relieve any such officer from criminal liability for entering on the discharge of his or her official duties without taking or filing such oath or executing or filing such undertaking in accordance with such provisions.