Skip to content

Commit

Permalink
fix notice where pretty_array was performing an array to string conv.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamagokun committed Oct 29, 2012
1 parent 61887c9 commit e053c37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Toby/ShowExceptions.php
Expand Up @@ -18,7 +18,10 @@ private function pretty_array($array,$name="data")
{
$result = "";
foreach($array as $key=>$value)
{
if(!is_string($value)) $value = 'Object';
$result .= "<tr><td>$key</td><td>$value</td></tr>";
}
if(empty($result))
return "<p>No $name.</p>";
return "<table><tbody><tr><th>Variable</th><th>Value</th></tr>$result</tbody></table>";
Expand Down Expand Up @@ -110,4 +113,4 @@ protected function error_template($e,$env=null)
</html>
TEMPLATE;
}
}
}

0 comments on commit e053c37

Please sign in to comment.