Skip to content
Merged
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
6 changes: 1 addition & 5 deletions ext/pdo/pdo_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ static bool pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode

mode = mode & ~PDO_FETCH_FLAGS;

if (mode < 0 || mode > PDO_FETCH__MAX) {
if (mode < 0 || mode >= PDO_FETCH__MAX) {
zend_argument_value_error(mode_arg_num, "must be a bitmask of PDO::FETCH_* constants");
return 0;
}
Expand Down Expand Up @@ -1123,10 +1123,6 @@ static bool pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode
zend_argument_value_error(mode_arg_num, "must use PDO::FETCH_CLASSTYPE with PDO::FETCH_CLASS");
return 0;
}
if (mode >= PDO_FETCH__MAX) {
zend_argument_value_error(mode_arg_num, "must be a bitmask of PDO::FETCH_* constants");
return 0;
}
ZEND_FALLTHROUGH;

case PDO_FETCH_CLASS:
Expand Down
Loading