Hi Iuri,
I haven't seen the "invalid command name" error; It's been in use on sites for over a year.
qf_get_inputs_as_array is designed to be used outside of ad_page_contract in the same way that ad_form does not use ad_page_contract.
Maybe executing qf_get_inputs_as_array inside of ad_page_contract causes the issue.