I get this error: Notice: unserialize(): Error at offset 0 of 5472 bytes in /home3/trisoni2/public_html/ohappy/admin/model/extension/module.php on line 32
I don't know what could be the reason. In PHP I do not really understand, so I give piece of code with a 32 string
if ($query->row) {
if( $query->row['code'] == 'dimastas' ){
return $setting = unserialize($query->row['setting']); /*<--- 32 string*/
}
return json_decode($query->row['setting'], true);
} else {
return array();
}
}
Initially the entries in the database look like this:
a:5:{s:6:"status";s:1:"1";s:4:"name";s:7:"Default";s:5:"class";s:0:"";s:6:"layout";s:4377:"[{"cls":"full-col full-slider","bgcolor":"","bgimage":"","fullwidth":"1","parallax":"0","sfxcls":null,"padding":"","margin":"","iposition":null,"iattachment":null,"cols":
But after a simple modification, which are provided by the Opencart CMS, the entries in the database are like this:
{"status":"1","name":"Default","class":"","layout":"[{\"cls\":\"full-col full-slider\",\"bgcolor\":\"\",\"bgimage\":\"\",\"fullwidth\":\"1\",\"parallax\":\"0\",\"sfxcls\":null,\"padding\":\"\",\"margin\":\"\",\"iposition\":null,\"iattachment\":null,\"cols\":
And after all this I get the error: Notice: unserialize(): Error at offset 0 of 5472 bytes in /home3/trisoni2/public_html/ohappy/admin/model/extension/module.php on line 32
In what could be the cause of the error and how to fix it? Please help