MDL-61619 core: use empty string instead of null in xmlize
authorJake Dallimore <jake@moodle.com>
Mon, 12 Mar 2018 02:56:31 +0000 (10:56 +0800)
committerJake Dallimore <jake@moodle.com>
Mon, 12 Mar 2018 03:12:00 +0000 (11:12 +0800)
lib/xmlize.php

index ef54a6e..78cf82b 100644 (file)
@@ -137,7 +137,7 @@ class core_xml_parser {
         $level = &$this->level;
         if (!empty($name)) {
             if (empty($current[$level])) {
-                $current[$level] = null;
+                $current[$level] = '';
             } else if (array_key_exists(0, $current[$level])) {
                 if (count($current[$level]) == 1) {
                     $current[$level] = $current[$level][0]; // We remove array index if we only have a single entry.