Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

VALID_FETCH_MODES lists three entries that are not usable fetch modes

Offen
#199 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@simon-mundy arbeitet bereits daran.

Seit 29.9.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.

Vorherrschende Sprache
PHP
Sterne
18
Forks
8
Ø Merge
6 T. 11 Std.
Gemergte PRs (30 T.)
14

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus php-db/phpdb

Alle Issues in php-db/phpdb

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.