diff options
author | Ferenc Kovacs <tyrael@php.net> | 2014-02-27 02:35:58 +0100 |
---|---|---|
committer | Ferenc Kovacs <tyrael@php.net> | 2014-02-27 02:35:58 +0100 |
commit | 79bfef5ba316c6a8632b7e0e8ffdca771feb1334 (patch) | |
tree | c45add10f718e89d7dff688d12ab355a08d50158 /ext/pdo_mysql/pdo_mysql.c | |
parent | 326ab8b147485eeb1ca023807272bc1994bcd7de (diff) | |
parent | 42a43d45317ac93c2ba934486879a0bc418bc34d (diff) | |
download | php-git-79bfef5ba316c6a8632b7e0e8ffdca771feb1334.tar.gz |
Merge branch 'PHP-5.6' into PHP-5.6.0
* PHP-5.6: (136 commits)
fix tests broken by 633f898f1520253d3530fe91fc82f68bca7c4627
add missing NEWS entry
add missing NEWS entry
add missing NEWS entry
add missing NEWS entry
add missing NEWS entry
add missing NEWS entry
Deprecate CN_match in favor of peer_name in SSL contexts
Remove cURL close policy related constants
Update stack size in tests/func/010.phpt
Don't add num_additional_args in SEND opcodes
Disallow use of positional args after unpacking
Store arg_num in fcall entry
Introduce zend_function_call_entry structure
move the default encoding NEWS entry to alpha3, as it was pushed after beta2 was tagged
rearrange the NEWS blocks a bit
add NEWS block for 5.6.0 beta1
restored that test part in ext/openssl to enable notify/wait
remove echo
fix stdin reading in new openssl tests
...
Diffstat (limited to 'ext/pdo_mysql/pdo_mysql.c')
-rw-r--r-- | ext/pdo_mysql/pdo_mysql.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |