The court in which any action, suit or proceeding is or shall be pending to review any such tax, assessment or water rate shall amend all irregularities, errors or defects, and may if necessary ascertain and determine the sum for which the person or property was legally liable and by order or decree fix the amount thereof. The sum so fixed shall be the amount of tax, assessment or water rate for which the person or property shall be liable.
N.J.S. § 54:4-59