Skip to content

Commit

Permalink
Fixed issue #13352: debug=2 broke all page with some server configura…
Browse files Browse the repository at this point in the history
…tion

Dev: PDO can send array
Dev: currently allowed : array or string
Dev: TODO : move info to controller and way to display to view
  • Loading branch information
Shnoulle committed Feb 14, 2018
1 parent 3dcf592 commit c5a6d6c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions application/views/admin/super/footer.php
Expand Up @@ -40,6 +40,12 @@
$systemInfos[gT('Database server version')] = $ex->getMessage();
}

/* Fix array to string , see #13352 */
foreach($systemInfos as &$systemInfo) {
if(is_array($systemInfo)) {
$systemInfo = json_encode($systemInfo, JSON_PRETTY_PRINT);
}
}
?>
<!-- Footer -->
<footer class='footer'>
Expand Down Expand Up @@ -90,13 +96,13 @@
</div>
<div class="modal-body">
<?php if(Permission::model()->hasGlobalPermission('superadmin','read')) { ?>
<h4><?=gT("Your system configuration:")?></h4>
<h4><?php eT("Your system configuration:")?></h4>
<ul class="list-group">
<?php foreach($systemInfos as $name => $systemInfo){ ?>
<li class="list-group-item">
<div class="ls-flex-row">
<div class="col-4"><?=$name?></div>
<div class="col-8"><?=$systemInfo?></div>
<div class="col-4"><?php echo $name ?></div>
<div class="col-8"><?php echo $systemInfo ?></div>
</div>
</li>
<?php } ?>
Expand Down

2 comments on commit c5a6d6c

@olleharstedt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(👍

@Shnoulle
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe , to be sure at 100% if(!is_string($systemInfo)) {

Please sign in to comment.