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

gettext: missing ValueErrors on seven function pages

Aperta
#6,001 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php, xml
Ambito
documentation

Direzione di ricerca

Start with the seven XML pages under reference/gettext/functions/ and the existing dgettext() page for the expected errors-section wording and <simpara> structure. Check ext/gettext/gettext.c and the cited PHP versions to verify each ValueError, false return, and version threshold. Done means every listed page has a complete errors section, bind_textdomain_codeset() documents string|false, and matching changelog rows are added.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Affected page

reference/gettext/functions/dcgettext.xml
reference/gettext/functions/dcngettext.xml
reference/gettext/functions/gettext.xml
reference/gettext/functions/ngettext.xml
reference/gettext/functions/textdomain.xml
reference/gettext/functions/bindtextdomain.xml
reference/gettext/functions/bind-textdomain-codeset.xml

Issue description

These pages have no errors section, or an incomplete one, and no matching changelog row:

  • dcgettext(), dcngettext(): ValueError for an empty or over 1024 byte domain, an over 4096 byte message/singular/plural, and LC_ALL as category (the empty domain and LC_ALL cases as of 8.4.0, the length cases as of 8.0.0).
  • gettext(), ngettext(): ValueError for an over 4096 byte message/singular/plural (8.0.0).
  • textdomain(), bind_textdomain_codeset(): the over 1024 byte domain is missing, and for textdomain() also "0" (8.4.0).
  • bindtextdomain(): empty or over 1024 byte domain; directory "0" or "" means the current directory, and the path must exist or false is returned.
  • bind_textdomain_codeset() returns string|false, the page only says string.
Steps to reproduce
try { dcgettext("", "x", LC_MESSAGES); } catch (Throwable $e) { echo $e->getMessage(); }

Output: dcgettext(): Argument #1 ($domain) must not be empty

Suggested fix

Add the errors section and changelog rows (same wording as the existing dgettext() page), use <simpara>. Sources: ext/gettext/gettext.c (php-8.0.0, php-8.4.0, php-8.5.9).

Lingua principale
XML
Stelle
606
Fork
906
Merge medio
1g 6h
PR unite (30g)
84

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né 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/doc-en

Tutte le issue di php/doc-en

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.