Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
fix(admin/redis_key): Use print_r($v, true) instead of json_encode($v…
Browse files Browse the repository at this point in the history
…, JSON_PRETTY_PRINT)
  • Loading branch information
Rhilip committed Aug 6, 2019
1 parent 259c5f1 commit 3f767de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/views/admin/redis_key.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
<?php if ($type == \Redis::REDIS_STRING): ?>
<h2>String Value</h2>
<figure>
<pre><code><?= is_string($value) ? $value : json_encode($value, JSON_PRETTY_PRINT) ?></code></pre>
<pre><code><?= is_string($value) ? $value : print_r($value, true) ?></code></pre>
</figure>
<?php elseif ($type == \Redis::REDIS_LIST): ?>
<h2>List Values</h2>
<ol>
<?php foreach ($value as $item): ?>
<li><code><?= is_string($item) ? $item : json_encode($item, JSON_PRETTY_PRINT) ?></code></li>
<li><code><?= is_string($item) ? $item : print_r($item, true) ?></code></li>
<?php endforeach; ?>
</ol>
<?php elseif ($type == \Redis::REDIS_HASH): ?>
Expand All @@ -71,7 +71,7 @@
<tr>
<td></td>
<td><code><?= $k ?></code></td>
<td><code><?= is_string($v) ? $v : json_encode($v, JSON_PRETTY_PRINT) ?></code></td>
<td><code><?= is_string($v) ? $v : print_r($v, true) ?></code></td>
</tr>
<?php endforeach; ?>
</tbody>
Expand Down Expand Up @@ -99,7 +99,7 @@
<tr>
<td><?= $index ?></td>
<td><code><?= $v ?></code></td>
<td><code><?= is_string($k) ? $k : json_encode($k, JSON_PRETTY_PRINT) ?></code></td>
<td><code><?= is_string($k) ? $k : print_r($k, true) ?></code></td>
</tr>
<?php $index++ ?>
<?php endforeach; ?>
Expand Down

0 comments on commit 3f767de

Please sign in to comment.