use wcf\system\box\BoxHandler;
use wcf\system\session\SessionHandler;
use wcf\system\WCF;
+use wcf\system\WCFACP;
/**
* NamedUserException shows a (well) styled page with the given error message.
* Shows a styled page with the given error message.
*/
public function show() {
- BoxHandler::getInstance()->disablePageLayout();
+ if (!class_exists(WCFACP::class, false)) {
+ BoxHandler::getInstance()->disablePageLayout();
+ }
SessionHandler::getInstance()->disableTracking();
WCF::getTPL()->assign([
use wcf\system\box\BoxHandler;
use wcf\system\session\SessionHandler;
use wcf\system\WCF;
+use wcf\system\WCFACP;
/**
* A PermissionDeniedException is thrown when a user has no permission to access
* Prints a permission denied exception.
*/
public function show() {
- BoxHandler::getInstance()->disablePageLayout();
+ if (!class_exists(WCFACP::class, false)) {
+ BoxHandler::getInstance()->disablePageLayout();
+ }
SessionHandler::getInstance()->disableTracking();
@header('HTTP/1.0 403 Forbidden');