Using firebase php, I am getting following error in a simple $firebase->set($data,$location)
function.
Uncaught exception 'Kreait\Firebase\Exception\FirebaseException' with message 'The location key "rural foothills m.d." contains on of the following invalid characters: .$#[]'
Is there a way to sanitize the value to avoid the error?
Thanks!
Sometimes you will see an error that says "Invalid data; couldn't parse JSON object, array, or value. Perhaps you're using invalid characters in your key names."
This error occurs when the fields you are trying to send to Firebase contain invalid characters. Firebase prohibits key names from containing:
To get around the error, you will need to manually assign names to the keys.