alecpl
2012-01-12 fd43a92b5d31bab019d9afec1c9846b7ab9291bb
- Fix possible infinite loop in buildThreadData()


1 files modified
6 ■■■■■ changed files
program/include/rcube_result_thread.php 6 ●●●●● patch | view | raw | blame | history
program/include/rcube_result_thread.php
@@ -553,12 +553,14 @@
    private function buildThreadData($data, &$depth, &$children, $level = 0)
    {
        foreach ((array)$data as $key => $val) {
            $children[$key] = !empty($val);
            $empty          = empty($val) || !is_array($val);
            $children[$key] = !$empty;
            $depth[$key] = $level;
            if (!empty($val))
            if (!$empty) {
                $this->buildThreadData($val, $depth, $children, $level + 1);
        }
    }
    }
    /**