Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

VALID_FETCH_MODES lists three entries that are not usable fetch modes

Aperta
#199 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@simon-mundy ci sta già lavorando.

Dal 29/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug confirmed

Result::VALID_FETCH_MODES contains three entries that cannot work through fetch():

  • PDO::FETCH_FUNC — PDO permits it only in fetchAll(). Result only ever calls fetch(), so it always raises ValueError: Can only use PDO::FETCH_FUNC in PDOStatement::fetchAll().
  • PDO::FETCH_PROPS_LATE (1048576) and PDO::FETCH_CLASSTYPE (262144) — bit flags to be OR'd with FETCH_CLASS, as the comments beside them in the source already note. Passed alone, PDO ignores them and falls back to the default mode, so accepting them as standalone modes is misleading.

Reproduced against SQLite in memory. ResultSetFetchModeTest covers all three: FETCH_FUNC under the modes that throw, the two flags under the modes that silently fall back.

Removing them is a BC break, so it wants a deprecation rather than a straight removal.

Lingua principale
PHP
Stelle
18
Fork
8
Merge medio
6g 11h
PR unite (30g)
14

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di php-db/phpdb

Tutte le issue di php-db/phpdb

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.