diff options
author | Johannes Schlüter <johannes@php.net> | 2014-02-23 14:56:32 +0100 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2014-02-23 14:56:32 +0100 |
commit | 2198bbce868e8a3423e05c573ab4f69417ef5b88 (patch) | |
tree | 30db5e4922088e18e6b58d5100d8deb33dfb0195 | |
parent | 851f36288299ff3dc4f8ff6d0fd9e5f56211d583 (diff) | |
parent | 3f258e6b46f1f74c672f68a23b2b0905b435aa5a (diff) | |
download | php-git-2198bbce868e8a3423e05c573ab4f69417ef5b88.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
-rw-r--r-- | Zend/zend_highlight.c | 2 | ||||
-rw-r--r-- | ext/pdo_mysql/pdo_mysql.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index ffec587806..e4f8d0237a 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -57,7 +57,7 @@ ZEND_API void zend_html_putc(char c) ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC) { const unsigned char *ptr = (const unsigned char*)s, *end = ptr + len; - unsigned char *filtered; + unsigned char *filtered = NULL; size_t filtered_len; if (LANG_SCNG(output_filter)) { diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c index 8ab1c344cc..6f4e9d5265 100644 --- a/ext/pdo_mysql/pdo_mysql.c +++ b/ext/pdo_mysql/pdo_mysql.c @@ -64,7 +64,12 @@ static MYSQLND * pdo_mysql_convert_zv_to_mysqlnd(zval * zv TSRMLS_DC) if (Z_TYPE_P(zv) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zv), php_pdo_get_dbh_ce() TSRMLS_CC)) { pdo_dbh_t * dbh = zend_object_store_get_object(zv TSRMLS_CC); - if (!dbh || dbh->driver != &pdo_mysql_driver) { + if (!dbh) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to retrieve handle from object store"); + return NULL; + } + + if (dbh->driver != &pdo_mysql_driver) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided PDO instance is not using MySQL but %s", dbh->driver->driver_name); return NULL; } |