by Jens Prymelski.
Hi.
Sorry for the late reply.
The problem occurs, because an array is provided to the htmlspecialchars() function within the xml_safe_text_content() function in the backup/util/xml/xml_writer.class.php file, which is not accepted.
The hotfix we use is to change the xml_safe_text_content function to accept an array as argument and implode() it.
Related file: <moodle_root_dir>/backup/util/xml/xml_writer.class.php
Function to change: protected function xml_safe_text_content($content) {...}
Content of the changed function:
protected function xml_safe_text_content($content) {
if (gettype($content) === 'array') {
$content = implode('', $content);
}
return htmlspecialchars($this->xml_safe_utf8($content), ENT_NOQUOTES);
}
Have a nice day,
Jens
Sorry for the late reply.
The problem occurs, because an array is provided to the htmlspecialchars() function within the xml_safe_text_content() function in the backup/util/xml/xml_writer.class.php file, which is not accepted.
The hotfix we use is to change the xml_safe_text_content function to accept an array as argument and implode() it.
Related file: <moodle_root_dir>/backup/util/xml/xml_writer.class.php
Function to change: protected function xml_safe_text_content($content) {...}
Content of the changed function:
protected function xml_safe_text_content($content) {
if (gettype($content) === 'array') {
$content = implode('', $content);
}
return htmlspecialchars($this->xml_safe_utf8($content), ENT_NOQUOTES);
}
Have a nice day,
Jens