mirror of
https://github.com/php/php-src.git
synced 2025-01-08 20:17:28 +08:00
bail out when detecting incorrect number of parameters to be bound.
This commit is contained in:
parent
1ee0293680
commit
b7df40a75a
@ -109,12 +109,13 @@ PHP_FUNCTION(mysqli_stmt_bind_param)
|
||||
start = 1;
|
||||
}
|
||||
|
||||
if (strlen(types) != argc - start) {
|
||||
if (typelen != argc - start) {
|
||||
/* number of bind variables doesn't match number of elements in type definition string */
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of elements in type definition string doesn't match number of bind variables");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (argc - start != stmt->stmt->param_count) {
|
||||
if (typelen != stmt->stmt->param_count) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of variables doesn't match number of parameters in prepared statement");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user