In any and all cases where persons have been employed or materials purchased pursuant to the terms of any statute authorizing such employment to perform services or the purchase of materials, the compensation for which by such statute is made a charge or claim against any county, and after such employment and performance of services or furnishing of materials, the statute purporting to authorize such employment and purchase is held by the supreme court of this state to be unconstitutional and void, the board of county commissioners of any such county shall, nevertheless, have power and authority to entertain a claim for such services or materials and allow and pay fair and reasonable compensation therefor.
K.S.A. 19-114