0

If I run PHP 8 on my website, the MySQL framework that I use for prepared statements fails when call_user_func_array() is called.

Here is the code:

 foreach ($params_bindable as $key => &$param) { 
  $params_bindable_withref[$key] = &$param; 
 }
 array_unshift($params_bindable_withref, $markers);
 call_user_func_array(array($this->stmt, "bind_param"), $params_bindable_withref);
}
$execute = $this->stmt->execute();

It looks like the solution to my problem is here: PHP: call_user_func_array: pass by reference issue

but I don't know how to implement it in my context.

The framework I am using is here: http://github.com/sunnysingh/database

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Then just remove `call_user_func_array`. This was an ugly hack used in the days of PHP 5, you don't need it anymore since the last 10 years. – Dharman Apr 27 '23 at 20:21

0 Answers0