I have develooped a website with yii2 advanced template, however when i copy all project to my server , i got this error when try to signup or add new record
3. in C:\xampp\htdocs\advanced\vendor\yiisoft\yii2\db\ActiveQueryTrait.php – yii\db\BaseActiveRecord::populateRecord(common\models\Vbpl, null) at line 132
$rows is null for some reason when populateRecord is called.
You either forgot to migrate your data on the server, some master table which is always populated, or you must handle the case in which the query return an empty dataset.
The problem should be here:
public static function populateRecord($record, $row)
{
$columns = array_flip($record->attributes());
foreach ($row as $name => $value) {
.....
$record->attributes(), I guess in some cases does not return and array, maybe in case of empty dataset.