Permalink
Browse files

Merge branch 'MDL-36942' of git://github.com/timhunt/moodle into MOOD…

…LE_24_STABLE
  • Loading branch information...
2 parents ada0988 + 7e252ac commit 35cb0e4a4c94707d6aaf6e5ad10fd020b4b376e1 Sam Hemelryk committed Dec 11, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 question/format/xml/format.php
@@ -905,17 +905,18 @@ protected function import_category($question) {
*/
protected function readquestions($lines) {
// We just need it as one big string
- $text = implode($lines, ' ');
- unset($lines);
+ $lines = implode('', $lines);
// This converts xml to big nasty data structure
// the 0 means keep white space as it is (important for markdown format)
try {
- $xml = xmlize($text, 0, 'UTF-8', true);
+ $xml = xmlize($lines, 0, 'UTF-8', true);
} catch (xml_format_exception $e) {
$this->error($e->getMessage(), '');
return false;
}
+ unset($lines); // No need to keep this in memory.
+
// Set up array to hold all our questions
$questions = array();

0 comments on commit 35cb0e4

Please sign in to comment.