PHP Warning – Undefined array keys “color-1-overlay” !!

Posted in: Newspaper
Post count: 14

I’m experiencing PHP warnings with TagDiv Newspaper 12 and td-composer when editing pages in WordPress admin:
Error messages:
Warning: Undefined array key “color-1-overlay” in /wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php on line 2679

Warning: Undefined array key “color-2-overlay” in /wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php on line 2679
Environment:

WordPress: [ta version]
Newspaper theme: 12.x
td-composer version: [ta version]
PHP version: 8.x

Issue location:
File: /wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php
Line: ~2679
Suggested fix:
Replace direct array access with null coalescing operator or isset() check:
php// Current code (causing warnings):
$overlay_color_1 = $atts[‘color-1-overlay’];
$overlay_color_2 = $atts[‘color-2-overlay’];

// Suggested fix:
$overlay_color_1 = $atts[‘color-1-overlay’] ?? ”;
$overlay_color_2 = $atts[‘color-2-overlay’] ?? ”;
This would ensure compatibility with PHP 8.x strict error reporting and prevent warnings when overlay colors are not defined in block configuration.
Current workaround:
I’ve temporarily suppressed warnings via error_reporting(), but a permanent fix in the core plugin would be appreciated.
Thank you for your attention to this matter.
Best regards,

Post count: 35449

Hello,
We’ll need some more details related to this situation, for example, if this is happeing using teh last theme version, which is 12.7.3, now in case if the problm persist we need to know if this is happeding on a specific page if is on a specific page, then it is need to check the settings from each block on taht page to make sure that only correct values have been set in the blocks settings. Normally, that php warning is referring to an option for a background linear-gradient
Thank you!

Post count: 14

psw: neuro2026
https://neuro.swiss/wp-content/uploads/2025/12/Capture-decran-2025-12-15-a-14.30.22.png

This is a mobile mode code error affecting the menus… I’ve temporarily hidden it with this code: // Hide PHP warnings
error_reporting(E_ERROR | E_PARSE);
ini_set(‘display_errors’, ‘0’);

Post count: 14

I’m on the latest version 12.7.3
I’m on the latest version.
I’ll create an admin account for you.(contact@tagdiv.com)

Post count: 35449

Thank you!
We’ll continue via email!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.