mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Fixed bug #42978 (mismatch between number of bound params and values causes
a crash in pdo_pgsql)
This commit is contained in:
parent
a29a9d5a42
commit
48878f2ecd
1 changed files with 5 additions and 0 deletions
|
@ -168,6 +168,11 @@ static int dispatch_param_event(pdo_stmt_t *stmt, enum pdo_param_event event_typ
|
|||
|
||||
iterate:
|
||||
if (ht) {
|
||||
if (zend_hash_num_elements(stmt->bound_param_map) != zend_hash_num_elements(ht)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of bound paramters %d does not match number of bound values %d", zend_hash_num_elements(stmt->bound_param_map), zend_hash_num_elements(ht));
|
||||
return 0;
|
||||
}
|
||||
|
||||
zend_hash_internal_pointer_reset(ht);
|
||||
while (SUCCESS == zend_hash_get_current_data(ht, (void**)¶m)) {
|
||||
if (!stmt->methods->param_hook(stmt, param, event_type TSRMLS_CC)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue