Advertisement:

Author Topic: Error importSQL::ModelCars  (Read 1479 times)

altavista

  • Full Member
  • ***
  • Posts: 114
Error importSQL::ModelCars
« on: May 30, 2017, 07:27:53 am »
Error importSQL::ModelCars
cars_attributes/struct.sql

I deleted all tables, but again i get error.

Any idea ?

helpszoon

  • Newbie
  • *
  • Posts: 3
Re: Error importSQL::ModelCars
« Reply #1 on: October 22, 2018, 10:58:01 pm »
hello ! what vers of php you used if you use 7.2 problem in conf.php in the admin of plugin .

change this code :
Code: [Select]
case("type_edit"):      $car_type = Params::getParam("car_type");
                                    if(is_array($car_type)) {
                                    foreach($car_type as $k => $v) {
                                        foreach($v as $kj => $vj) {
                                            ModelCars::newInstance()->updateVehicleType($k, $kj, $vj);
                                        }
                                    }
                                    }

add this  if(is_array($car_type)) {
foreach.....
}

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
Re: Error importSQL::ModelCars
« Reply #2 on: October 23, 2018, 03:24:30 pm »
Hello,

That same error happens in a quite a few plugins when using PHP 7.2, there's no that error in 7.0. Thank you for sharing the fix. :)

Regards.