diff --git a/engine/grammar_parser.object.inc b/engine/grammar_parser.object.inc
index eb4dc59..5e881c3 100644
--- a/engine/grammar_parser.object.inc
+++ b/engine/grammar_parser.object.inc
@@ -735,7 +735,7 @@ class PGPClass extends PGPBase {
   public function signature($indent = '') {
     $this->debugPrint(__METHOD__);
     // Save comment and body; restore after printing.
-    $comment = $this->comment;
+    $comment = isset($this->comment) ? $this->comment : '';
     $body = $this->body;
     $this->comment = '';
     $this->body = NULL;
