Fixed refcounting

This commit is contained in:
Dmitry Stogov 2014-05-28 01:28:38 +04:00
parent 5270563167
commit 864aa7746f

View File

@ -883,7 +883,7 @@ static PHP_METHOD(PDO, getAttribute)
array_init(return_value);
add_next_index_str(return_value, STR_COPY(dbh->def_stmt_ce->name));
if (!Z_ISUNDEF(dbh->def_stmt_ctor_args)) {
Z_ADDREF(dbh->def_stmt_ctor_args);
if (Z_REFCOUNTED(dbh->def_stmt_ctor_args)) Z_ADDREF(dbh->def_stmt_ctor_args);
add_next_index_zval(return_value, &dbh->def_stmt_ctor_args);
}
return;