Skip to content

Commit a817384

Browse files
committed
Minor review
1 parent 6a9b4e1 commit a817384

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ext/pdo/pdo_stmt.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,16 +1592,13 @@ void pdo_stmt_free_default_fetch_mode(pdo_stmt_t *stmt)
15921592
{
15931593
enum pdo_fetch_type default_fetch_mode = stmt->default_fetch_type & ~PDO_FETCH_FLAGS;
15941594
if (default_fetch_mode == PDO_FETCH_INTO) {
1595-
// Assert that we have an object to fetch into?
1596-
if (stmt->fetch.into) {
1597-
OBJ_RELEASE(stmt->fetch.into);
1598-
}
1595+
ZEND_ASSERT(stmt->fetch.into != NULL);
1596+
OBJ_RELEASE(stmt->fetch.into);
15991597
} else if (default_fetch_mode == PDO_FETCH_CLASS) {
16001598
if (stmt->fetch.cls.ctor_args != NULL) {
16011599
zend_hash_release(stmt->fetch.cls.ctor_args);
16021600
}
16031601
}
1604-
/* Zero out fetch field */
16051602
memset(&stmt->fetch, 0, sizeof(stmt->fetch));
16061603
}
16071604

@@ -2046,7 +2043,6 @@ zend_object *pdo_dbstmt_new(zend_class_entry *ce)
20462043
pdo_stmt_t *stmt;
20472044

20482045
stmt = zend_object_alloc(sizeof(pdo_stmt_t), ce);
2049-
20502046
zend_object_std_init(&stmt->std, ce);
20512047
object_properties_init(&stmt->std, ce);
20522048

0 commit comments

Comments
 (0)