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

html5 parser crash: dom_html_collection_named_item: Assertion `iter.candidate->type == XML_ELEMENT_NODE' failed.

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

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
72/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ệ
c, php
Lĩnh vực
web-dev

Hướng nghiên cứu

Start at ext/dom/html_collection.c:58 and the dom_html_collection_named_item function, then reproduce the provided Dom\HTMLDocument chain on PHP 8.7. The work is done when the input no longer aborts with the assertion; preserve the example as a regression check if the repository's existing test structure supports it.

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

Mô tả

Bug Status: Needs Triage
Description

The following code:

<?php

Dom\HTMLDocument::createFromString(<<<a
<!DOCTYPE html>
<b id="container">

a)
    ->getElementById('container')
    ->getElementsByClassName('')
    ->namedItem("here");

Resulted in this output:

php: /home/user/software/php-install/src/ext/dom/html_collection.c:58: dom_html_collection_named_item: Assertion `iter.candidate->type == XML_ELEMENT_NODE' failed.
Aborted
PHP Version
PHP 8.7.0-dev (cli) (built: Sep 23 2026 15:02:26) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.7.0-dev, Copyright © Zend by Perforce
    with Zend OPcache v8.7.0-dev, Copyright ©, by Zend by Perforce
Operating System

Ubuntu 24.04

Ngôn ngữ chính
C
Star
40.4k
Fork
8.2k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
113

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 php/php-src

Tất cả issue của php/php-src

Issue tương tự

Thêm issue về C

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.