I am trying to pass variables from a survey onto a wordpress website via URL. While the variables do successfully pass, I also get this message:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /home4/insig14/public_html/wp-includes/class-wp-hook.php on line 286
I know that it's either an "add_action" or add_filter" issue, and the only issue I can think of is in the code I added to the functions.php :
for ($x=1;$x<=38;$x++){
$a = "tsati";
$b = $a . $x;
add_action('init', add_get_val($b));
}
function add_get_val($b){
global $wp;
$wp-> add_query_var($b);
}
There are 38 variables I'm passing with each variable being "tsatiX" (ex. tsati1, tsati2...). The variables successfully are passed, but the error keeps appearing on top of the website. It's probably a problem with my "add_action" function, but I'm not sure what it is. Any help?