diff --git a/question/format/xhtml/format.php b/question/format/xhtml/format.php
index 1a74c21c2fc..43de9c01d77 100755
--- a/question/format/xhtml/format.php
+++ b/question/format/xhtml/format.php
@@ -20,7 +20,7 @@ function writequestion( $question ) {
// question reflects database fields for general question and specific to type
// if a category switch, just ignore
- if ($question-qtype=='category') {
+ if ($question->qtype=='category') {
return '';
}