There is a bug here, ATM `wprp_get_api_keys` can return `false`, which you are passing to `in_array` on line 23. `generate_hashes` should always return an `array`, just an empty one on no API Keys.