]> granicus.if.org Git - php/commitdiff
Fixes the crash part of PECL Bug #3434.
authorWez Furlong <wez@php.net>
Sun, 13 Feb 2005 03:26:43 +0000 (03:26 +0000)
committerWez Furlong <wez@php.net>
Sun, 13 Feb 2005 03:26:43 +0000 (03:26 +0000)
ext/pdo/pdo_dbh.c

index 88c4d43b1d313df42fbdad00f1ba85f0c78dbe3e..3a4fbe3e007fbcee09e7a617b8eda058171c935d 100755 (executable)
@@ -406,6 +406,7 @@ static PHP_METHOD(PDO, prepare)
        stmt->query_string = estrndup(statement, statement_len);
        stmt->query_stringlen = statement_len;
        stmt->default_fetch_type = PDO_FETCH_BOTH;
+       stmt->dbh = dbh;
 
        if (dbh->methods->preparer(dbh, statement, statement_len, stmt, driver_options TSRMLS_CC)) {
                /* prepared; create a statement object for PHP land to access it */