DataObjects/ProjectDirectory.php
[Pman.Core] / DataObjects / Group_Rights.php
index 2fc9087..3787fd3 100755 (executable)
@@ -111,7 +111,7 @@ class Pman_Core_DataObjects_Group_Rights extends DB_DataObject
         $enabled =  array('Core') ;
         $enabled = explode(',', $ff->enable);
         $disabled =  explode(',', $ff->disable? $ff->disable: '');
-        $pman = $ff->rootDir . '/Pman';
+        $pman = $ff->rootDir . '/Pman/';
         $ret = array();
          //echo '<PRE>';print_r($enabled);
         foreach($enabled as $module) {
@@ -120,6 +120,10 @@ class Pman_Core_DataObjects_Group_Rights extends DB_DataObject
                 continue;
             }
             $ar = (array)json_decode(file_get_contents($fn));
+            if (empty($ar)) {
+                // since these are critical files.. die'ing with error is ok.
+                die("invalid json file: " . $fn);
+               }
            // echo '<PRE>';print_r($ar);
             foreach($ar as $k=> $perm) {
                 if ($k[0] == '/') {