summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/mod_structure_toc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mod_structure_toc.php b/modules/mod_structure_toc.php
index 3581f8a..8991a80 100644
--- a/modules/mod_structure_toc.php
+++ b/modules/mod_structure_toc.php
@@ -20,7 +20,7 @@ if( is_object( $gStructure ) && $gStructure->isValid() && $gStructure->hasViewPe
$struct = &$gStructure;
} elseif( @BitBase::verifyId( $module_params['structure_id'] ) ) {
$struct = new LibertyStructure( $module_params['structure_id'] );
-} elseif( is_object( $gContent ) && $gContent->hasViewPermission( FALSE ) ) {
+} elseif( is_object( $gContent ) && is_a( $gContent, 'LibertyBase' ) && $gContent->hasViewPermission( FALSE ) ) {
if( $structures = $gContent->getStructures() ) {
// We take the first structure by default, perhaps there is a better choice
$structureId = $structures[0]['structure_id'];