Skip to content

Commit

Permalink
tidier debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Whitlock committed Oct 19, 2018
1 parent 0521b6a commit bc839a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/admin/config/DebugController.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ public function render(){
'OK' => "\xCE\x9F\xCE\x9A",
'tick' => "\xE2\x9C\x93",
'json' => json_decode('"\\u039f\\u039a \\u2713"'),
'mbstring' => loco_check_extension('mbstring'),
'mbstring' => loco_check_extension('mbstring') ? "\xCE\x9F\xCE\x9A \xE2\x9C\x93" : 'No',
) );

// Sanity check mbstring.func_overload
if( 2 !== strlen("\xC2\xA3") ){
$encoding->mbstring = 'Error, disable mbstring.func_overload';
}

// PHP / env memory settings:
$memory = new Loco_mvc_PostParams( array(
'WP_MEMORY_LIMIT' => $this->memory_size( loco_constant('WP_MEMORY_LIMIT') ),
Expand Down
5 changes: 1 addition & 4 deletions tpl/admin/config/debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
<dd><?php echo $encoding->OK?> <span id="loco-utf8-check"><?php echo $encoding->tick?></span></dd>

<dt>Multibyte support:</dt>
<dd><?php echo $encoding->mbstring?'Yes':'No'?></dd>

<dt>Byte lengths:</dt>
<dd><?php echo 2 === strlen("\xC2\xA3")?'OK':'<span class="loco-danger">ERROR</span>'?></dd>
<dd><?php echo $encoding->mbstring?></dd>
</dl>
</div>

Expand Down

0 comments on commit bc839a6

Please sign in to comment.