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

Commit

Permalink
fix(redis_key): Fix array value cause parser error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Jul 25, 2019
1 parent 68e4550 commit 4bf5dad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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><?= json_encode($value, JSON_PRETTY_PRINT) ?></code></pre>
<pre><code><?= is_string($value) ? $value : json_encode($value, JSON_PRETTY_PRINT) ?></code></pre>
</figure>
<?php elseif ($type == \Redis::REDIS_LIST): ?>
<h2>List Values</h2>
<ol>
<?php foreach ($value as $item): ?>
<li><code><?= $item ?></code></li>
<li><code><?= is_string($item) ? $item : json_encode($item, JSON_PRETTY_PRINT) ?></code></li>
<?php endforeach; ?>
</ol>
<?php elseif ($type == \Redis::REDIS_HASH): ?>
Expand Down Expand Up @@ -99,7 +99,7 @@
<tr>
<td><?= $index ?></td>
<td><code><?= $v ?></code></td>
<td><code><?= $k ?></code></td>
<td><code><?= is_string($k) ? $k : json_encode($k, JSON_PRETTY_PRINT) ?></code></td>
</tr>
<?php $index++ ?>
<?php endforeach; ?>
Expand Down

0 comments on commit 4bf5dad

Please sign in to comment.