diff options
Diffstat (limited to 'ext/pdo/pdo_dbh.c')
| -rw-r--r-- | ext/pdo/pdo_dbh.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index d17867d1f9..32e6e1bdd0 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -468,23 +468,11 @@ static void pdo_stmt_construct(pdo_stmt_t *stmt, zval *object, zend_class_entry fci.object_ptr = object; fci.symbol_table = NULL; fci.retval_ptr_ptr = &retval; - if (ctor_args) { - HashTable *ht = Z_ARRVAL_P(ctor_args); - Bucket *p; - - fci.param_count = 0; - fci.params = safe_emalloc(sizeof(zval*), ht->nNumOfElements, 0); - p = ht->pListHead; - while (p != NULL) { - fci.params[fci.param_count++] = (zval**)p->pData; - p = p->pListNext; - } - } else { - fci.param_count = 0; - fci.params = NULL; - } + fci.params = NULL; fci.no_separation = 1; + zend_fcall_info_args(&fci, ctor_args TSRMLS_CC); + fcc.initialized = 1; fcc.function_handler = dbstmt_ce->constructor; fcc.calling_scope = EG(scope); |
