-2

I'm using Yii2 Advanced Version.

I have an error but I couldn't find how can I fix that.

Can you help me please?

The error said :

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\rentacar-web-admin\vendor\yiisoft\yii2\helpers\BaseArrayHelper.php on line 124

Please Help me, thanks

Farshid616
  • 1,404
  • 1
  • 14
  • 26
CBE
  • 1
  • 1

2 Answers2

0

Kindly post some part of the code or the scenario where you are facing this error, if you have used any foreach loop in your code then, check with your variable which you have passed for foreach as 1st parameter

foreach($sampleArr as $key => $value) {
    // your code
}

for example here $sampleArr, it will be not an array, that's the reason it is giving this error.

0

Thanks but i found the solution.

The solition is add in backend/config/main-local.php:

<?php
return [
];
CBE
  • 1
  • 1