Permalink
Browse files

Use var_export instead of print_r for better clarity.

  • Loading branch information...
1 parent d4998e3 commit a95609849e42656b35f0110a08cc4436ad56b916 @bharat bharat committed Jan 29, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/rest/helpers/rest.php
@@ -25,8 +25,8 @@ static function reply($data=array()) {
if (Input::instance()->get("output") == "html") {
header("Content-type: text/html");
$html = preg_replace(
- "#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t<]*)#ise", "'\\1<a href=\"\\2\" >\\2</a>'",
- print_r($data, 1));
+ "#([\w]+?://[\w]+[^ \'\"\n\r\t<]*)#ise", "'<a href=\"\\1\" >\\1</a>'",
+ var_export($data, 1));
print "<pre>$html</pre>";
} else {
header("Content-type: application/json");

0 comments on commit a956098

Please sign in to comment.