From: niekt0 Date: Fri, 12 Nov 2010 22:05:01 +0000 (+0100) Subject: warning fix X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=8fce70c6673fc30d8cb3d7c859e3fbcf53e34125;p=mirrors%2FKyberia-bloodline.git warning fix --- 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) {