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

PHP warnings on incomplete tag index and mailing list addresses

Aperta
#559 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
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php
Ambito
backend

Direzione di ricerca

Start with the named locations in system/core/tags.php, tagindex.php, various.php, mailinglist.php, and festival.php, then reproduce the listed requests and contribution form case on PHP 8.2 or later. Check how missing XPath results, route arguments, and optional form values are handled at those call sites. Done means the affected requests still return 404 where specified and the listed PHP warnings and deprecations no longer appear.

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

Descrizione

Impact: Low Level: Easy Pagetype: Mailinglist Type: Bug Value: Coders

Incomplete or unknown addresses of the tag index and the mailing list answer correctly (404), but log PHP warnings and deprecations first, which clutters the log of every site that is crawled:

Request Message
tag, tag/nl/, tag/nl/<unknown tag>, tag/<unknown language>/<tag> Attempt to read property "parentNode" on null in system/core/tags.php:11 (HyphaTags::findTagByLabel() reads ->parentNode of a search without result)
tag, tag/nl/ urldecode(): Passing null to parameter #1 in tagindex.php:19 and explode(): Passing null to parameter #2 in various.php:177 (xpath_encode(null))
nl/<mailing list>/mails (no id) DOMDocument::getElementById(): Passing null to parameter #1 in mailinglist.php:752
festival contribution posted without a website value (for example by a configured contribution form without that field) DOMElement::setAttribute(): Passing null to parameter #2 in festival.php:820 (not the document.php:566 case of #408)

Steps to reproduce. Open tag/nl/Bestaat%20niet and tag/nl/ on a fictional site: 404, and the messages above in the container log on PHP 8.2, 8.4 and 8.5 (main, d97ab7b).

Suggested fix: in findTagByLabel() return null when the search finds nothing ($node = $hyphaXml->findOneXPath($path); return $node ? new HyphaTag($node->parentNode) : null;), return 404 when the label argument is missing, return 404 in mailingView()/mailingEditView() when there is no id, and use dataFor(…, '') for optional contribution fields.

Lingua principale
JavaScript
Stelle
5
Fork
9
Merge medio
18h 7m
PR unite (30g)
11

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 PlanBCode/hypha

Tutte le issue di PlanBCode/hypha

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.