Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ext/pdo/pdo_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,7 +1873,12 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
mode = Z_LVAL(args[skip]);
flags = mode & PDO_FETCH_FLAGS;

retval = pdo_stmt_verify_mode(stmt, mode, 0);
/* pdo_stmt_verify_mode() returns a boolean value */
if (pdo_stmt_verify_mode(stmt, mode, 0)) {
retval = SUCCESS;
} else {
retval = FAILURE;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retval = ... ? SUCCESS : FAILURE;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually smarter... I don't use ternaries very often lol

}
}

Expand Down