Customizer responsive sanitizer fatals when input is an array
Maintainer thường phản hồi trong vòng 1 ngày
@HardeepAsrani đang làm issue này rồi.
Từ ngày 9/10/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 66/100
Hướng nghiên cứu
Bắt đầu từ sanitize_responsive_int_json() trong header-footer-grid/Traits/Core.php (khoảng dòng 77-86), nơi json_decode($input, true) chạy trước mọi kiểm tra kiểu, và từ phần đăng ký sanitizer trong header-footer-grid/Core/Builder/Abstract_Builder.php. Sau đó đọc tests/test-neve-sanitization.php, nơi helper mã hóa các fixture thành JSON nên đầu vào là mảng gốc không bao giờ được kiểm thử. Hoàn thành khi mảng gốc không còn gây fatal, các đầu vào chuỗi đã serialize vẫn được sanitize như trước, và có một test bao phủ trường hợp mảng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
When a responsive Customizer setting is submitted as an array, the sanitizer can terminate the request with a TypeError instead of returning a sanitized value. This interrupts the affected Customizer preview request.
Customer context
Product / area: Neve, Header Footer Grid responsive Customizer settings
Version: Neve 4.2.16
Environment: WordPress 7.1.3; PHP 8.3.31 and 8.4.26
Integration / third party: Not identified as relevant
Reported error / symptom: json_decode(): Argument #1 ($json) must be of type string, array given
Impact: The fatal interrupts the affected Customizer preview request; two sites were represented in telemetry.
Reproduction notes
Production telemetry captured this during a frontend request in the Customizer preview/sanitization path on Neve 4.2.16. The exact responsive setting and submitted payload are not available. The source-level failure can be exercised by calling sanitize_responsive_int_json() with an array on a PHP version that rejects non-string input to json_decode(); no local runtime reproduction was performed.
Diagnosis
Conclusion
Confirmed product defect: production telemetry records an array reaching sanitize_responsive_int_json(), and the Neve 4.2.16 implementation passes that value directly to json_decode(). The reported TypeError matches this source path.
Where this likely occurs
header-footer-grid/Traits/Core.php—Abstract_Component::sanitize_responsive_int_json()approx. lines 77–86 callsjson_decode($input, true)before validating the input type.header-footer-grid/Core/Builder/Abstract_Builder.php— responsive setting registration approx. lines 400–402 attaches the sanitizer callback.tests/test-neve-sanitization.php—do_assertion_for_sanitize_responsive_int_json()lines 241–243 JSON-encodes its array fixtures before invoking the sanitizer.
Engineering notes
The crash is reported for Neve 4.2.16 on PHP 8.3 and 8.4. The stack identifies the Customizer setting sanitization path, and the telemetry gives direct evidence that the callback received an array. Existing tests cover array-shaped values only after JSON encoding, not the native array input reported here. No regression boundary was identified; the method has existed since 2019.
Test coverage status
tests/test-neve-sanitization.php::test_sanitize_responsive_int_json() covers serialized JSON input, including fixtures initially represented as arrays. Its helper encodes those fixtures before the sanitizer call, so relevant native-array input coverage is absent from the inspected test path. No test suite was run.
What to verify or explore next
- Reproduce the reported Customizer callback path with a native array input on the affected PHP versions.
- Identify which responsive setting and client payload produce the array in the Customizer request.
- Confirm behavior for existing serialized-string inputs alongside the reported native-array case.
Unknowns / follow-up
The exact setting identifier, request payload, and triggering user interaction were not captured in the telemetry report.
Confidence
Confidence: 98/100
The Neve 4.2.16 Customizer crash is confirmed by production telemetry and source: the sanitizer passes the reported array directly to json_decode(). The three loader fingerprints all resolve to an unguarded require in Neve 4.1.4/4.2.2/4.2.6, while v4.2.14 contains a missing-file guard, so those older-version signals do not warrant a new issue when a fixed release is available.
Crash telemetry
| Occurrences | 20 |
| Distinct sites | 2 |
| First seen | 2026-10-07 20:18 UTC |
| Last seen | 2026-10-08 15:09 UTC |
| Crash location | product:header-footer-grid/Traits/Core.php:78 |
| Request context | frontend |
| Inside Themeisle SDK | no |
| Product versions | 4.2.16 |
| WP versions | 7.1.3 |
| PHP versions | 8.3.31, 8.4.26 |
| SDK versions | 3.3.66 |
Source: automated crash report — neve, fingerprint dd32a661da5a24e257d2836e290e0a41
Generated by bug-report-triage (ID: bug-report-triage_6ac883627ef247.03851758)
- Ngôn ngữ chính
- PHP
- Star
- 307
- Fork
- 88
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Codeinwp/neve
-
Customizer controls script throws when WooCommerce is inactive and an Elementor shop template exists (woocommerce_product_catalog section missing)Có thể đã có người làm @girishpanchal30 đã nhận 2 ngày trước. Đang mởbug-report bug-report-triage customer report
Codeinwp/neve#4653 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Duplicate H1: hidden screen-reader title H1 rendered alongside custom layout H1 when page title is hiddenCó thể đã có người làm @HardeepAsrani đã nhận 2 ngày trước. Đang mởbug-report bug-report-triage customer report
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
Codeinwp/neve#4652 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature-request-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature-request-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
customer report feature-request-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Codeinwp/neve
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
TYPO3BestPractices/tea#2409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
api-platform/core#8690 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
No Code Attached Yet
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
joomla/joomla-cms#48626 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
DorsetDigital/silverstripe-schema-manager#26 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 4 ngày