Commit ab43ce20 authored by mikeytown2's avatar mikeytown2

Issue #2008440 by mikeytown2: Limit httprl recursion.

parent 97874c4b
......@@ -2428,7 +2428,7 @@ function httprl_lock_release($name) {
*/
function httprl_print_empty(&$data, $level = 0) {
$level++;
if ($level < 10 ) {
if ($level < 5) {
if (is_object($data)) {
if (method_exists($data, '__set') || get_class($data) != 'stdClass') {
$new_object = new stdClass;
......@@ -2476,8 +2476,8 @@ function httprl_pr($input) {
$input = func_get_args();
// If bool or strlen = 0 use var_export on that variable.
$input = unserialize(serialize($input));
$data = httprl_print_empty($input);
$data = unserialize(serialize($input));
$data = httprl_print_empty($data);
// Merge into base array if only one argument passed in.
if (count($data) == 1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment