From 8fce70c6673fc30d8cb3d7c859e3fbcf53e34125 Mon Sep 17 00:00:00 2001 From: niekt0 Date: Fri, 12 Nov 2010 23:05:01 +0100 Subject: [PATCH] warning fix --- wwwroot/inc/permissions.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wwwroot/inc/permissions.inc b/wwwroot/inc/permissions.inc index 64da8ef..e6c2eb9 100644 --- a/wwwroot/inc/permissions.inc +++ b/wwwroot/inc/permissions.inc @@ -5,8 +5,13 @@ class permissions { function isHierarch($node) { global $db; - $user_id=$_SESSION['user_id']; + if (IsSet($_SESSION['user_id'])) { + $user_id=$_SESSION['user_id']; + } else { + $user_id=0; + } if (!$user_id) return false; + $node_vector=chunk_split($node['node_vector'],VECTOR_CHARS,';'); $hierarchy=explode(';',$node_vector); foreach ($hierarchy as $hierarch) { -- 2.30.2