]> granicus.if.org Git - php/commitdiff
- Fixed bug #49174 (crash on queryString set)
authorFelipe Pena <felipe@php.net>
Sun, 13 Dec 2009 19:53:44 +0000 (19:53 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 13 Dec 2009 19:53:44 +0000 (19:53 +0000)
NEWS
ext/pdo/pdo_dbh.c

diff --git a/NEWS b/NEWS
index c1a999ff23fccd60e5a0ceab72d49e5228a917c0..c8657facf8b3813c8d6d82e3539b7ce9beb06a24 100644 (file)
--- 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
index 3f190c12121b99910ba442595a0ade9e203b3aa7..c389458ad5c1586ae9a461e9d4369545d93acb3c 100755 (executable)
@@ -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;