]> granicus.if.org Git - php/commitdiff
MFB: Better fix for bug #44189
authorIlia Alshanetsky <iliaa@php.net>
Tue, 26 Feb 2008 00:14:04 +0000 (00:14 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 26 Feb 2008 00:14:04 +0000 (00:14 +0000)
ext/pdo/pdo_stmt.c
ext/pdo_pgsql/pgsql_statement.c

index 00226316693afbbeeab097df51d3cd60ae34dbda..eac65790cf36c028bfbd88c98b923a137478bab6 100755 (executable)
@@ -166,10 +166,6 @@ static int dispatch_param_event(pdo_stmt_t *stmt, enum pdo_param_event event_typ
 
        ht = stmt->bound_params;
 
-       if (ht && !stmt->bound_param_map) {
-               return 0;
-       }
-
 iterate:
        if (ht) {
                zend_hash_internal_pointer_reset(ht);
index 197c3f5290ade4f7c07857cf1e64aac76900ca74..81377e6bcc6ef3d47764602598397e5ff7a85193 100644 (file)
@@ -250,6 +250,9 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
                                return 1;
 
                        case PDO_PARAM_EVT_EXEC_PRE:
+                               if (!stmt->bound_param_map) {
+                                       return 0;
+                               }
                                if (!S->param_values) {
                                        S->param_values = ecalloc(
                                                        zend_hash_num_elements(stmt->bound_param_map),