Skip to content

Commit 4dfbf07

Browse files
committed
Fix logic error in PDO
1 parent a49555a commit 4dfbf07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/pdo/pdo_stmt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,8 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
18731873
mode = Z_LVAL(args[skip]);
18741874
flags = mode & PDO_FETCH_FLAGS;
18751875

1876-
retval = pdo_stmt_verify_mode(stmt, mode, 0);
1876+
/* pdo_stmt_verify_mode() returns a boolean value */
1877+
retval = pdo_stmt_verify_mode(stmt, mode, 0) ? SUCCESS : FAILURE;
18771878
}
18781879
}
18791880

0 commit comments

Comments
 (0)