I get this error in my OpenCart log. Says the error is on line 1, which:
<?php if(isset($social_discount['name']) && $social_discount['name']!="") { ?>
I would really appreciate help in fixing this.
To prevent this error, you should change your code as follows:
<?php if(is_array($social_discount) && isset($social_discount['name']) && $social_discount['name']!="") { ?>
$socialdiscount is a string, not an array, so $social_discount['name'] considered as $social_discount[0] => the first character of the string. 0 not set. $socialdiscount is an empty string.
$socialdiscount
$social_discount['name']
$social_discount[0]
0
Source: https://habr.com/ru/post/1468774/More articles:Tools for a good web development environment on Chrome OS - google-chromeNHibernate OleDB: Invalid program binding when using session.get (id) - c #Google Apps Marketplace - how to add areas to support the application - google-app-engineSearch for all possible paths in c / C ++ LLVM - c ++How to get around this tree - c #Apache Commons BeanUtilsBean - exclude attributes from description () - javaProblem with programmatically deleting a timer - google-apps-scriptnetbeans cannot open shared library during RUN compilation - netbeansAutomatically remove spaces in primary key sequence - sqlHow to restart Phusion Passenger + Apache in production mode on an Ubuntu server for Ruby on Rails? - ruby-on-railsAll Articles