After migrating from php5.6 to php7 The following warning appears.
Line 745: [Warning] Nested by-reference foreach loop, make sure that array modifications (if any) do what you expect foreach ($value['subscribes'] as &$v) { } Line 746: [Warning] Nested by-reference foreach loop, make sure that array modifications (if any) do what you expect foreach ($v as &$val) { }
foreach ($this->view->service as &$value){
foreach ($value["subscribes"] as &$v){
foreach ($v as &$val){
if(isset($val["info"]["subscribe"]['tariff_label']) && $val["info"]["subscribe"]['tariff_label'] != '') {
$val["info"]["subscribe"]['tariff_name'] = $val["info"]["subscribe"]['tariff_label'] .' / '.$val["info"]["subscribe"]['tariff_id'];
}
}
unset($val);
}
unset($v);
}
unset($value);
I couldn't find how to fix this. I don't even understand what the problem is. If anyone knows, please help.