diff --git a/httprl.module b/httprl.module index 86dd4db..e2180ce 100644 --- a/httprl.module +++ b/httprl.module @@ -2381,37 +2381,37 @@ function httprl_pr($data) { // If bool or null print out the dump of that variable. foreach ($data as &$v) { - if (is_bool($v) || is_null($v)) { - $v = strtoupper(var_export($v, TRUE)); - } - elseif (is_array($v) || is_object($v)) { + if (is_array($v) || is_object($v)) { foreach ($v as &$va) { - if (is_bool($va) || is_null($va)) { - $va = strtoupper(var_export($va, TRUE)); - } - elseif (is_array($va) || is_object($va)) { + if (is_array($va) || is_object($va)) { foreach ($va as &$val) { - if (is_bool($val) || is_null($val)) { - $val = strtoupper(var_export($val, TRUE)); - } - elseif (is_array($val) || is_object($val)) { + if (is_array($val) || is_object($val)) { foreach ($val as &$valu) { - if (is_bool($valu) || is_null($valu)) { - $valu = strtoupper(var_export($valu, TRUE)); - } - elseif (is_array($valu) || is_object($valu)) { + if (is_array($valu) || is_object($valu)) { foreach ($valu as &$value) { - if (is_bool($value) || is_null($value)) { + if (!is_array($value) && !is_object($value) && (is_bool($value) || is_null($value) || empty($v))) { $value = strtoupper(var_export($value, TRUE)); } } } + elseif (is_bool($valu) || is_null($valu) || empty($valu)) { + $valu = strtoupper(var_export($valu, TRUE)); + } } } + elseif (is_bool($val) || is_null($val) || empty($val)) { + $val = strtoupper(var_export($val, TRUE)); + } } } + elseif (is_bool($va) || is_null($va) || empty($va)) { + $va = strtoupper(var_export($va, TRUE)); + } } } + elseif (is_bool($v) || is_null($v) || empty($v)) { + $v = strtoupper(var_export($v, TRUE)); + } } // Merge into base array if only one argument passed in. @@ -2420,7 +2420,7 @@ function httprl_pr($data) { } // Remove non UTF-8 Characters, escape HTML markup, remove extra new lines. - $output = array_filter(explode("\n", htmlentities(iconv('utf-8', 'utf-8//IGNORE', print_r($data, TRUE)), ENT_QUOTES, 'UTF-8'))); + $output = array_filter(explode("\n", htmlentities(iconv('utf-8', 'utf-8//IGNORE', print_r($data, TRUE)), ENT_QUOTES, 'UTF-8')), 'strlen'); // Whitespace compression. foreach ($output as $key => $value) {