PHP 7.4 warning “Trying to access array offset on value of type int”
-
Hi team,
We found this in the debug.log
PHP Notice: Trying to access array offset on value of type int in /www/wp-content/plugins/side-cart-woocommerce/templates/global/footer/buttons.php on line 32
Apparently this is a new notice, introduced in PHP 7.4
https://www.php.net/manual/de/migration74.incompatible.php#migration74.incompatible.core.non-array-accessThis is the line of code:
if( !$button_data['label'] ) continue;
Fix suggestion:
if( !is_array($button_data) || !isset($button_data['label'])) continue;
Cheers, Frank
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP 7.4 warning “Trying to access array offset on value of type int”’ is closed to new replies.