Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello! I fixed my other problem, but, there is a problem i tried to fix for 2 hours straight. The error is: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object.
Here is a bit of my code:
PHP
public function bindQueryParams($stmt, $paramType, $paramArray = array())
{
    $paramValueReference[] = & $paramType;
    for ($i = 0; $i < count($paramArray); $i ++) {
        $paramValueReference[] = & $paramArray[$i];
    }
    call_user_func(array(
        $stmt,
        'bind_param'
    ), $paramValueReference);
}

If you need the full code, Please tell me. I also used a tutorial on how to make a sign up form so its NOT MY CODE.

What I have tried:

I tried it for two hours straight
Posted
Updated 3-Oct-20 4:14am

1 solution

You are trying to call an array, which makes no sense. See PHP: call_user_func - Manual[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900