complex table generate fail

Đang mở
#2,062 3 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 5 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
28/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
backend

Hướng nghiên cứu

The error is raised in TableHeaderFooter in src/Mpdf.php, called from _tableWrite in src/Tag/Table.php, which is reached when a table is closed. The reporter has no reproducing HTML, so first build a multi-page table with header or footer rows and confirm the notice. Done means that case renders without the 'Undefined array key' error and the fix is covered by a test.

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

Mô tả

bug/fix help wanted notices-warnings
Guidelines
Description of the bug
{
    "message": "Undefined array key 3",
    "exception": "ErrorException",
    "file": "(*)/vendor/mpdf/mpdf/src/Mpdf.php",
    "line": 11892,
    "trace": [
        {
            "file": "(*)/vendor/mpdf/mpdf/src/Mpdf.php",
            "line": 11892,
            "function": "Illuminate\\Foundation\\Bootstrap\\{closure}",
            "class": "Illuminate\\Foundation\\Bootstrap\\HandleExceptions",
            "type": "->"
        },
        {
            "file": "(*)/vendor/mpdf/mpdf/src/Mpdf.php",
            "line": 22556,
            "function": "TableHeaderFooter",
            "class": "Mpdf\\Mpdf",
            "type": "->"
        },
        {
            "file": "(*)/vendor/mpdf/mpdf/src/Tag/Table.php",
            "line": 1131,
            "function": "_tableWrite",
            "class": "Mpdf\\Mpdf",
            "type": "->"
        },
        {
            "file": "(*)/vendor/mpdf/mpdf/src/Tag.php",
            "line": 247,
            "function": "close",
            "class": "Mpdf\\Tag\\Table",
            "type": "->"
        },
        {
            "file": "(*)/vendor/mpdf/mpdf/src/Mpdf.php",
            "line": 13827,
            "function": "CloseTag",
            "class": "Mpdf\\Tag",
            "type": "->"
        },
        {
            "file": "(*)/app/Http/Controllers/PrintController.php",
            "line": 76,
            "function": "WriteHTML",
            "class": "Mpdf\\Mpdf",
            "type": "->"
        },
        ...]
}
mPDF version

v8.2.4

PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)

8.2

Reproducible PHP+CSS+HTML snippet suffering by the error

no time to produce, may be later

how to fix:

mpdf.php:11892 change to if (array_key_exists($i,$content)) { foreach ($content[$i] as $tablehf) {
mpdf.php:12332 change to }}// end column $content

Ngôn ngữ chính
PHP
Star
4.7k
Fork
1.1k
Merge trung bình
6 ngày 11 giờ
Pull request đã merge (30 ngày)
4

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

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 mpdf/mpdf

Tất cả issue của mpdf/mpdf

Issue tương tự

Thêm issue về PHP

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.