note 105563 deleted from mysqli-stmt.bind-param by cmb
| From: | cmb@php.net | Date: | Sun, 22 Sep 2019 08:05:09 +0000 |
| Subject: | note 105563 deleted from mysqli-stmt.bind-param by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212312@lists.php.net to get a copy of this message | ||
Note Submitter: ghostarthour at exahost dot eu
----
Simple workaround for casting:
<?php
function mysqli_cast_workaround() {
$numargs = func_num_args();
$types = '';
for ($i = 0; $i < $numargs; $i++) {
$arg = func_get_arg($i);
if (is_numeric($arg)) {
$types.="i";
}else{
$types.="s";
}
$args[($i+1)] = $arg;
unset($arg);
}
$args[0] = $types;
return call_user_func_array('mysqli_stmt_bind_param',$args);
}
?>