mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/pdo: Drop redundant mode check, and fix the first check (#17302)
This commit is contained in:
committed by
GitHub
parent
dfdba3cfe4
commit
1969955e50
@@ -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;
|
||||
}
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user