Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

PHP warnings on incomplete tag index and mailing list addresses

Abierto
#559 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
php
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
5
Forks
9
Merge medio
19 h 10 min
PR fusionados (30 d)
12

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PlanBCode/hypha

Todos los issues de PlanBCode/hypha

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.