]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #38168 (Crash in pdo_pgsql on missing bound parameters).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 1 Aug 2006 16:32:30 +0000 (16:32 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 1 Aug 2006 16:32:30 +0000 (16:32 +0000)
ext/pdo_pgsql/pgsql_statement.c

index e6499d73a174ed7177ffb1294be7b80937581968..4a8d4e11764f807a03ce1d19810af716f4fda39c 100644 (file)
@@ -188,13 +188,13 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
                        case PDO_PARAM_EVT_EXEC_PRE:
                                if (!S->param_values) {
                                        S->param_values = ecalloc(
-                                                       zend_hash_num_elements(stmt->bound_params),
+                                                       zend_hash_num_elements(stmt->bound_param_map),
                                                        sizeof(char*));
                                        S->param_lengths = ecalloc(
-                                                       zend_hash_num_elements(stmt->bound_params),
+                                                       zend_hash_num_elements(stmt->bound_param_map),
                                                        sizeof(int));
                                        S->param_formats = ecalloc(
-                                                       zend_hash_num_elements(stmt->bound_params),
+                                                       zend_hash_num_elements(stmt->bound_param_map),
                                                        sizeof(int));
 
                                }