From 3aceb1e952d6459fa154f7865e5230b2cbb63c2c Mon Sep 17 00:00:00 2001
From: Martin Haase <martin.haase@daasi.de>
Date: Wed, 6 Apr 2011 13:45:34 +0000
Subject: [PATCH] debug string comparing a class

git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@9475 7c539038-3410-0410-b1ec-0f2a7bf1c452
---
 info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php b/info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php
index 4d3ba55..e1c6890 100644
--- a/info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php
+++ b/info.textgrid.middleware.tgauth.webauth/tglib/RBAC.class.php
@@ -37,7 +37,7 @@ class RBAC {
     $xpath->registerNamespace("c", "http://textgrid.info/namespaces/middleware/tgwebauth");
 
     $this->rbacbase = $xpath->query("/c:conf/c:authz[@instance='${authZinstance}']/c:rbacbase")->item(0)->nodeValue;
-    if ($this->rbacbase->length == 0) {
+    if (!isset ($this->rbacbase) || strlen($this->rbacbase) == 0) {
 	echo "Error: '${authZinstance}' has no RBAC base configured!<br/>\n";
 	return null;
     }
-- 
GitLab