In any and all cases where a board of county commissioners has regularly allowed and paid a claim or claims against a county pursuant to the terms of any statute and such statute has thereafter been held by the supreme court of this state to be unconstitutional and void, the members of such board shall not become personally liable by reason of such payment nor shall the county be entitled to recover back any such payment where the only objection thereto is that the law pursuant to which payment was made was thereafter held unconstitutional.
K.S.A. 19-115