I keep getting these PHP error warnings.
Warning: Illegal string offset 'plugin_name' in /home/customer/www/website.com/public_html/wp-admin/includes/class-wp-privacy-policy-content.php on line 96
Warning: Illegal string offset 'policy_text' in /home/customer/www/website.com/public_html/wp-admin/includes/class-wp-privacy-policy-content.php on line 97
The code is as shown below:
foreach ( $old as $key => $data ) {
            if ( ! empty( $data['removed'] ) ) {
                unset( $old[ $key ] );
                continue;
            }
            $old[ $key ] = array(
                'plugin_name' => $data['plugin_name'],
                'policy_text' => $data['policy_text'],
            );
        }
How do i fix this? Thank you in advance!
 
     
    