[ticket/12003] ACP broken when error thrown

Fix display of ACP when error is outputted before <html> tag.

PHPBB3-12003
Merge remote-tracking branch 'Zoddo/ticket/12003' into develop

* Zoddo/ticket/12003:
  [ticket/12003] ACP broken when error thrown
[ticket/12207] Forum broken when error thrown

Fix display of forum when error is outputted before <html> tag.

PHPBB3-12207
Merge remote-tracking branch 'Zoddo/ticket/12207' into develop

* Zoddo/ticket/12207:
  [ticket/12207] Forum broken when error thrown