doctor420 Posted November 21, 2014 Share Posted November 21, 2014 Hi, I have the following error while displaying the shipping address of an order in my order history. Warning: Illegal string offset 'title' in /home/salviame/public_html/salviadivinorum.com.mx/store/includes/functions/general.php on line 454 Here's my code: $street = tep_output_string_protected($address['street_address']); $suburb = tep_output_string_protected($address['suburb']); $city = tep_output_string_protected($address['city']); $state = tep_output_string_protected($address['state']); if (isset($address['country_id']) && tep_not_null($address['country_id'])) { $country = tep_get_country_name($address['country_id']); if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) { $state = tep_get_zone_code($address['country_id'], $address['zone_id'], $state); } } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']['title']); } else { $country = ''; } $postcode = tep_output_string_protected($address['postcode']); $zip = $postcode; Any help is really appreciated. Thanks. Link to comment Share on other sites More sharing options...
doctor420 Posted April 6, 2015 Author Share Posted April 6, 2015 Hi, Any one can help with this issue ? I have not find any solution. Thanks. Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 7, 2015 Share Posted April 7, 2015 It is occurring because the code isn't seeing the variable as a string. The correct approach would be to find where the array it is in is being built and change it there but this change should fix this one problem. Change $country = tep_output_string_protected($address['country']['title']); to $country = tep_output_string_protected((string)$address['country']['title']); Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.