I'm getting this error in my OpenCart log. Says the error is on line 1 which is:
<?php if(isset($social_discount['name']) && $social_discount['name']!="") { ?>
Would highly appreciate any help to fix this.
To prevent this error, you should change your code like the following:
<?php if(is_array($social_discount) && isset($social_discount['name']) && $social_discount['name']!="") { ?>
$socialdiscount
is a string, not an array, so $social_discount['name']
is treated as $social_discount[0]
=> first character of the string. 0
is not set means $socialdiscount
is an empty string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With