Issues with headers already sent and stdClass::$blog_id

Hi!

I cant access the admin panel with the mapped domain (mapped.lo instead of site1.demo.lo). The site1.demo.lo works in the backend though.

When I try to login (mapped.lo/login) the code below appears.

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Warning: Cannot modify header information - headers already sent by (output started at /*SITELOCATION*/wp-includes/functions.php:3071) in /*SITELOCATION*/wp-login.php on line 365

Warning: Cannot modify header information - headers already sent by (output started at /*SITELOCATION*/wp-includes/functions.php:3071) in /*SITELOCATION*/wp-login.php on line 377

Warning: Cannot modify header information - headers already sent by (output started at /*SITELOCATION*/wp-includes/functions.php:3071) in /*SITELOCATION*/wp-includes/pluggable.php on line 680

Warning: Cannot modify header information - headers already sent by (output started at /*SITELOCATION*/wp-includes/functions.php:3071) in /*SITELOCATION*/wp-includes/pluggable.php on line 681

Warning: Cannot modify header information - headers already sent by (output started at /*SITELOCATION*/wp-includes/functions.php:3071) in /*SITELOCATION*/wp-includes/pluggable.php on line 682

Notice: Undefined index: HTTPS in /*SITELOCATION*/files/apps/domain-mapping/domain-mapping.php on line 746

Warning: Cannot modify header information - headers already sent by (output started at /*SITELOCATION*/wp-includes/functions.php:3071) in /*SITELOCATION*/wp-includes/pluggable.php on line 881

It works fine to access the frontend and it redirects to the mapped domain, but it shows the following notices:

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined index: HTTPS in /*SITELOCATION*/files/apps/domain-mapping/domain-mapping.php on line 746

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

And finally, when I try to access the admin section (mapped.lo/wp-admin/) it shows following:

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Notice: Undefined property: stdClass::$blog_id in /*SITELOCATION*/wp-includes/functions.php on line 3071

Warning: Cannot modify header information - headers already sent by (output started at /*SITELOCATION*/wp-includes/functions.php:3071) in /*SITELOCATION*/wp-includes/pluggable.php on line 881

Lot of code there, but I hope it will be helpfull!

Thanks for any help!