Check if debugMode is defined before using it

Else the sabre error page (where the var is not defined) will throw
warnings all the time.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-07-02 15:46:59 +02:00
parent 0157e30ad4
commit ac3137a166
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ style('core', ['styles', 'header']);
<ul> <ul>
<li><?php p($l->t('Remote Address: %s', [$_['remoteAddr']])) ?></li> <li><?php p($l->t('Remote Address: %s', [$_['remoteAddr']])) ?></li>
<li><?php p($l->t('Request ID: %s', [$_['requestID']])) ?></li> <li><?php p($l->t('Request ID: %s', [$_['requestID']])) ?></li>
<?php if ($_['debugMode']): ?> <?php if (isset($_['debugMode']) && $_['debugMode'] === true): ?>
<li><?php p($l->t('Type: %s', [$_['errorClass']])) ?></li> <li><?php p($l->t('Type: %s', [$_['errorClass']])) ?></li>
<li><?php p($l->t('Code: %s', [$_['errorCode']])) ?></li> <li><?php p($l->t('Code: %s', [$_['errorCode']])) ?></li>
<li><?php p($l->t('Message: %s', [$_['errorMsg']])) ?></li> <li><?php p($l->t('Message: %s', [$_['errorMsg']])) ?></li>