- Affected version
- 2.2.15
PHP:
public function displayFatalExceptionMessage($e)
{
$upgradePending = $this->hasPendingUpgrade();
$isInstalled = \XF\Util\File::installLockExists();
$ignorePendingUpgrade = (!$isInstalled || $this->ignorePendingUpgrade || $this->forceShowTrace);
if (\XF::$debugMode || !$isInstalled || $this->forceShowTrace)
{
$showTrace = true;
}
else
{
$showTrace = false;
try
{
$visitor = \XF::visitor();
$showTrace = $visitor->user_id && $visitor->is_admin;
}
catch (\Throwable $e) {}
}
This is not ideal; an admin with limited permissions can't make any sense of a stack trace and probably should not have this information at all anyway.
As
XF\Error
also isn't extendable this is kind of a showstopper.Could this be changed so only super administrators (or administrator somehow specifically configured to see them) get stack traces?