diff --git a/question/format/xml/format.php b/question/format/xml/format.php index e8e4edbe8cf..36d70334ced 100755 --- a/question/format/xml/format.php +++ b/question/format/xml/format.php @@ -105,6 +105,9 @@ class qformat_xml extends qformat_default { else $xml = $xml[$index]; } if ($istext) { + if (!is_string($xml)) { + $this->error( 'Invalid xml file - string expected (use CDATA?)' ); + } $xml = addslashes( trim( $xml ) ); }