alecpl
2012-01-12 63b9ff12d2573513c59e347d70de494d2c67a4ce
- Fix possible infinite loop in build_thread_data()


1 files modified
6 ■■■■■ changed files
program/include/rcube_imap_cache.php 6 ●●●●● patch | view | raw | blame | history
program/include/rcube_imap_cache.php
@@ -1108,12 +1108,14 @@
    private function build_thread_data($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->build_thread_data($val, $depth, $children, $level + 1);
        }
    }
    }
    /**