aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2013-02-04 20:51:07 -0500
committerCash Costello <cash.costello@gmail.com>2013-02-09 07:53:45 -0500
commit707df9db27cf2154910978427b9844448bcf931a (patch)
tree6ca8ba536758fe2f34ac6a55a18b7befa76bc74c /engine/lib/views.php
parent85e4c16f39a8b00b229644bcd175663541dfd51a (diff)
downloadelgg-707df9db27cf2154910978427b9844448bcf931a.tar.gz
elgg-707df9db27cf2154910978427b9844448bcf931a.tar.bz2
Small changes to remove static analysis noise and simplify flow
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 9ee7ae00c..7d8347863 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1451,17 +1451,13 @@ function elgg_get_views($dir, $base) {
*/
function elgg_view_tree($view_root, $viewtype = "") {
global $CONFIG;
- static $treecache;
+ static $treecache = array();
// Get viewtype
if (!$viewtype) {
$viewtype = elgg_get_viewtype();
}
- // Has the treecache been initialised?
- if (!isset($treecache)) {
- $treecache = array();
- }
// A little light internal caching
if (!empty($treecache[$view_root])) {
return $treecache[$view_root];