debugging doesn`t return anything on Warning: Illegal string offset 'panels_info'

I need a solution on how to proceed in fixing this WordPress error:

Fatal error: Uncaught Error: Cannot use string offset as an array

code sample line 586:

foreach( $panels_data[ 'widgets' ] as $i => $widget ) {
        $widget['panels_info']['widget_index'] = $i;
        $row_index = intval( $widget['panels_info']['grid'] );
        $cell_index = intval( $widget['panels_info']['cell'] );
        $layout_data[ $row_index ]['cells'][ $cell_index ]['widgets'][] = $widget;
    }

    return $layout_data;
}