Support Forums - Classified Ads Script Osclass
General osclass questions => Report bug => Topic started by: dsf on May 27, 2023, 01:10:15 PM
-
Hi,
After switching to PHP 8, i get some of these:
[24-May-2023 23:57:32 Europe/Athens] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/oc-includes/osclass/helpers/hUtils.php:64
Line 64 in hUtils.php is:
if(@$item["locale"][$locale][$field] <> '') {
I have no idea when this happens and i fail to recreate it, doing all standard things, like login/register and post/edit an ad as a normal user.
-
@dsf
You can replace that line with:
if(isset($item["locale"]) && isset($item["locale"][$locale]) && isset($item["locale"][$locale][$field]) && $item["locale"][$locale][$field] <> '') {
-
Thank you, i will do that and update here with my findings.
-
So far, so good.
-
Cool 8)