Skip to content

Commit e5c415c

Browse files
committed
ext/pdo: Move assignment to declaration for clarity
1 parent 8c27553 commit e5c415c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/pdo/pdo_stmt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,8 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h
936936
case PDO_FETCH_NAMED:
937937
/* already have an item with this name? */
938938
{
939-
zval *curr_val;
940-
if ((curr_val = zend_hash_find(Z_ARRVAL_P(return_value), stmt->columns[i].name))) {
939+
zval *curr_val = zend_hash_find(Z_ARRVAL_P(return_value), column_name);
940+
if (curr_val != NULL) {
941941
zval arr;
942942
if (Z_TYPE_P(curr_val) != IS_ARRAY) {
943943
/* a little bit of black magic here:

0 commit comments

Comments
 (0)