mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Make zval2myslqnd implementations aware of inheritance
This commit is contained in:
parent
bcb39d9c6a
commit
d3a4af4db8
@ -531,7 +531,7 @@ PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_new(zend_class_entry *class_
|
||||
#include "ext/mysqlnd/mysqlnd_reverse_api.h"
|
||||
static MYSQLND *mysqli_convert_zv_to_mysqlnd(zval * zv TSRMLS_DC)
|
||||
{
|
||||
if (Z_TYPE_P(zv) == IS_OBJECT && Z_OBJCE_P(zv) == mysqli_link_class_entry) {
|
||||
if (Z_TYPE_P(zv) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zv), mysqli_link_class_entry) TSRMLS_CC) {
|
||||
MY_MYSQL * mysql;
|
||||
MYSQLI_RESOURCE * my_res;
|
||||
mysqli_object * intern = (mysqli_object *)zend_object_store_get_object(zv TSRMLS_CC);
|
||||
|
@ -61,7 +61,7 @@ ZEND_DECLARE_MODULE_GLOBALS(pdo_mysql)
|
||||
#include "ext/mysqlnd/mysqlnd_reverse_api.h"
|
||||
static MYSQLND * pdo_mysql_convert_zv_to_mysqlnd(zval * zv TSRMLS_DC)
|
||||
{
|
||||
if (Z_TYPE_P(zv) == IS_OBJECT && Z_OBJCE_P(zv) == php_pdo_get_dbh_ce()) {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user