diff --git a/httprl.module b/httprl.module index 017efc1..86dd4db 100644 --- a/httprl.module +++ b/httprl.module @@ -2379,10 +2379,38 @@ function httprl_pr($data) { // Get extra arguments passed in. $data = func_get_args(); - // If empty print out the dump of that variable. - foreach ($data as $key => &$value) { - if (strlen(print_r($value, TRUE)) == 0) { - $value = strtoupper(var_export($value, TRUE)); + // 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)) { + foreach ($v as &$va) { + if (is_bool($va) || is_null($va)) { + $va = strtoupper(var_export($va, TRUE)); + } + elseif (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)) { + foreach ($val as &$valu) { + if (is_bool($valu) || is_null($valu)) { + $valu = strtoupper(var_export($valu, TRUE)); + } + elseif (is_array($valu) || is_object($valu)) { + foreach ($valu as &$value) { + if (is_bool($value) || is_null($value)) { + $value = strtoupper(var_export($value, TRUE)); + } + } + } + } + } + } + } + } } }