Illegal String Offset PHP Warning filling error logs

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeIllegal String Offset PHP Warning filling error logs

This topic has been marked as not resolved.

Hello,

I found my OpenCart error log was over 3GB in size and the entire log is basically just these same Illegal string offset warnings. They come in every second.

Can you please advise on how to fix?

2017-06-28 14:57:21 - PHP Warning:  Illegal string offset 'tab_attribute' in /var/www/vhosts/***/tb_themes/pavilion/model/defaultModel.php on line 223
2017-06-28 14:57:24 - PHP Warning:  Illegal string offset 'product_id' in /var/www/vhosts/***/tb_themes/pavilion/catalog/plugin/ProductPlugin.php on line 189
2017-06-28 14:57:24 - PHP Warning:  Illegal string offset 'tab_attribute' in /var/www/vhosts/***/tb_themes/pavilion/model/defaultModel.php on line 223
2017-06-28 14:57:26 - PHP Warning:  Illegal string offset 'product_id' in /var/www/vhosts/***/tb_themes/pavilion/catalog/plugin/ProductPlugin.php on line 189
2017-06-28 14:57:26 - PHP Warning:  Illegal string offset 'tab_attribute' in /var/www/vhosts/***/tb_themes/pavilion/model/defaultModel.php on line 223
2017-06-28 14:57:32 - PHP Warning:  Illegal string offset 'product_id' in /var/www/vhosts/***uk/tb_themes/pavilion/catalog/plugin/ProductPlugin.php on line 189
2017-06-28 14:57:32 - PHP Warning:  Illegal string offset 'tab_attribute' in /var/www/vhosts/***/tb_themes/pavilion/model/defaultModel.php on line 223

June 28, 2017 at 5:55 pm #60122

This is very old and unsupported Pavilion version, so we’ll try to provide a quick manual fix. Open tb_themes/pavilion/model/defaultModel.php, go to line 223 and change

'title'  => $data['tab_attribute'],

with

'title'  => !empty($data['tab_attribute']) ? $data['tab_attribute'] : '',

then open tb_themes/pavilion/catalog/plugin/ProductPlugin.php, go to line 189 and replace

$product_info = $this->getModel('products')->getProductInfo($event['data']['product_id']);

with

$product_info = $this->getModel('products')->getProductInfo(!empty($event['data']['product_id']) ? $event['data']['product_id'] : 0);

Regards,
ThemeBurn team

July 4, 2017 at 4:42 pm #60225
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.