mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fix #35431; LAZY fetch and fetchAll == crash.
Lazy makes no sense with fetchAll; disallow it.
This commit is contained in:
parent
6543134dea
commit
63dae4ee74
@ -1138,6 +1138,13 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, int mode, int fetch_all TSRMLS
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
||||
case PDO_FETCH_LAZY:
|
||||
if (fetch_all) {
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_LAZY can't be used with PDOStatement::fetchAll()" TSRMLS_CC);
|
||||
return 0;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
default:
|
||||
if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) {
|
||||
|
Loading…
Reference in New Issue
Block a user