summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-12-13 19:53:44 +0000
committerFelipe Pena <felipe@php.net>2009-12-13 19:53:44 +0000
commit0d4bf4110f7c3e61b1ad68baec5dcd728b0526ca (patch)
tree1a88913d1839d474af2fafbbfcf017d18c6c68b2
parent6b838aa6d2f419dbda3f33e6588c7f6c0da6238c (diff)
downloadphp-git-0d4bf4110f7c3e61b1ad68baec5dcd728b0526ca.tar.gz
- Fixed bug #49174 (crash on queryString set)
-rw-r--r--NEWS1
-rwxr-xr-xext/pdo/pdo_dbh.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index c1a999ff23..c8657facf8 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ PHP NEWS
seg fault). (davbrown4 at yahoo dot com, Felipe)
- Fixed bug #50209 (Compiling with libedit cannot find readline.h).
(tcallawa at redhat dot com)
+- Fixed bug #49174 (crash on queryString set). (Felipe)
10 Dec 2009, PHP 5.2.12RC4
- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 3f190c1212..c389458ad5 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -44,7 +44,7 @@ void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *sqlstate
char *message = NULL;
const char *msg;
- if (dbh->error_mode == PDO_ERRMODE_SILENT) {
+ if (dbh && dbh->error_mode == PDO_ERRMODE_SILENT) {
#if 0
/* BUG: if user is running in silent mode and hits an error at the driver level
* when they use the PDO methods to call up the error information, they may
@@ -71,7 +71,7 @@ void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *sqlstate
spprintf(&message, 0, "SQLSTATE[%s]: %s", *pdo_err, msg);
}
- if (dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
+ if (dbh && dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", message);
} else {
zval *ex, *info;