Can you post your code where the shortcode involved is called as well as the complete code of your function? Please use the code button at the top of the editor to enclose your code so that it can be read more easily.
Your code should look like this
// your code here
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users