Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

PHP warnings on incomplete tag index and mailing list addresses

Đang mở
#559 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
5
Fork
9
Merge trung bình
18 giờ 7 phút
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PlanBCode/hypha

Tất cả issue của PlanBCode/hypha

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.