--- ./tableofcontents.pages.inc 2012/02/16 03:03:16     1.1
+++ ./tableofcontents.pages.inc 2012/02/16 03:04:15
@@ -619,7 +619,8 @@
   global $_tableofcontents_toc;
   global $_tableofcontents_block_toc;
 
-  if (get_class($format) == 'stdClass')
+    # Carheden - fixed bug, reported to mod devs.
+  if (gettype($format) == 'object' && get_class($format) == 'stdClass')
     $format = $format->format;
 
   // this is a special case... do what it takes at once
