Hello,
after upgrading to 2.0.16 I have some problem with JSON.With 2.0.15 everything worked and I didn’t change anything there:
Code
$query = new Query;
$query->select('id, number, name')
->from('checklisten')
->where(['active' => 1])
->andWhere(['or',
['like', 'name', $q],
['like', 'number', $q]
])
->orderBy('name');
$command = $query->createCommand();
$data = $command->queryAll();
$out = [];
foreach ($data as $d) {
$out[] = ['value' => $d['id'], 'name' => $d['name'], 'number' => $d['number']];
}
echo \yii\helpers\Json::encode($out);
which comes to an error
I know the “null” is wrong here, but where does it come from? In Changelog I read there was a change in JSON, might this be the source of the problem?
Thanks, Beate