summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-07-28 00:40:01 +0000
committerMarcus Boerger <helly@php.net>2004-07-28 00:40:01 +0000
commit7557b388de8ba753763260f30853fb8ab01fc22c (patch)
tree606976959c8e98094d04e48c14374add5815eb8f
parent8059173ad32a2a7f9141dbb0b20eb6a67b9ffcab (diff)
downloadphp-git-7557b388de8ba753763260f30853fb8ab01fc22c.tar.gz
- Fix shutdown problems
-rwxr-xr-xext/pdo_mysql/mysql_driver.c2
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 700543ab5b..876f1767fe 100755
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -153,7 +153,7 @@ static int mysql_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
H->einfo.errmsg = NULL;
}
efree(H);
- H = NULL;
+ dbh->driver_data = NULL;
}
return 0;
}
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 70eae1ca65..3bb1fe0435 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -31,6 +31,7 @@
#include "pg_config.h" /* needed for PG_VERSION */
#include "php_pdo_pgsql.h"
#include "php_pdo_pgsql_int.h"
+#include "zend_exceptions.h"
int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *file, int line TSRMLS_DC) /* {{{ */
{
@@ -62,6 +63,11 @@ int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *
einfo->errmsg = estrdup(errmsg);
}
+ if (!dbh->methods) {
+ zend_throw_exception_ex(php_pdo_get_exception(), *pdo_err TSRMLS_CC, "[%d] %s",
+ einfo->errcode, einfo->errmsg);
+ }
+
return errcode;
}
/* }}} */
@@ -93,7 +99,7 @@ static int pgsql_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
H->einfo.errmsg = NULL;
}
pefree(H, dbh->is_persistent);
- H = NULL;
+ dbh->driver_data = NULL;
}
return 0;
}