PHP warning “Undefined array key ‘icon’” in WordPress editor | Note: This is a live, high-traffic production site.

Ticket for: Accordions
0
PHP warning “Undefined array key ‘icon’” in WordPress editor | Note: This is a live, high-traffic production site. 1
rhauri
Jun 10, 2025 04:49 PM 0 Answers
Member Since Jun 2025
Subscribed Subscribe Not subscribe
Flag(0)
Issue Summary
Note: This is a live, high-traffic production site.

When creating or editing an accordion entry in the WordPress admin, the following warning appears:

pgsql
Warning: Undefined array key "icon" in
/wp-content/plugins/accordions/includes/class-post-meta-accordions.php on line 205

Steps to Reproduce

  1. Log in to the WordPress dashboard.

  2. Go to Accordions → Add New (or edit an existing accordion).

  3. The editor loads and the warning shows above the “Accordions data” panel.


Impact

  • Visible warning confuses editorial staff and support.

  • Log files grow quickly, adding server load.

  • Future PHP versions may treat this warning as a fatal error.

  • Business-critical risk because the site handles heavy public traffic.


Suspected Cause

Line 205 of includes/class-post-meta-accordions.php accesses $tab['icon'] directly.
If the key is missing, PHP 8.3 raises the warning.
A simple isset() check or default value would prevent it.


Environment

ComponentVersion
WordPress6.8.1
PHP8.3
Accordions plugin2.3.13
Accordions Pro1.0.15

Expected Result

No PHP warnings when the editor opens.


Requested Action

  1. Provide a patch or update that checks for the missing key.

  2. Confirm the planned fix date.

1 Subscribers
PHP warning “Undefined array key ‘icon’” in WordPress editor | Note: This is a live, high-traffic production site. 1
Submit Answer
Please login to submit answer.
0 Answers
Sort By: