ValueError

XMLWriter::startElement(): Argument #2 must be a valid element name, "@attributes" given

C:\laragon\www\limesurvey\application\helpers\export_helper.php(3152)

3140 * @param int $sParentKey parent key
3141 */
3142 function writeXmlFromArray(XMLWriter $xml, $aData, $sParentKey = '')
3143 {
3144     $bCloseElement = false;
3145     foreach ($aData as $key => $value) {
3146         if (!empty($value)) {
3147             if (is_array($value)) {
3148                 if (is_numeric($key)) {
3149                     $xml->startElement($sParentKey);
3150                     $bCloseElement = true;
3151                 } elseif (isAssociativeArray($value)) {
3152                     $xml->startElement($key);
3153                     $bCloseElement = true;
3154                 }
3155 
3156                 if (is_numeric($key)) {
3157                     writeXmlFromArray($xml, $value, $sParentKey);
3158                 } else {
3159                     writeXmlFromArray($xml, $value, $key);
3160                 }
3161 
3162                 if ($bCloseElement === true) {
3163                     $xml->endElement();
3164                     $bCloseElement = false;

Stack Trace

#0
+
 C:\laragon\www\limesurvey\application\helpers\export_helper.php(3152): XMLWriter->startElement("@attributes")
3147             if (is_array($value)) {
3148                 if (is_numeric($key)) {
3149                     $xml->startElement($sParentKey);
3150                     $bCloseElement = true;
3151                 } elseif (isAssociativeArray($value)) {
3152                     $xml->startElement($key);
3153                     $bCloseElement = true;
3154                 }
3155 
3156                 if (is_numeric($key)) {
3157                     writeXmlFromArray($xml, $value, $sParentKey);
#1
+
 C:\laragon\www\limesurvey\application\helpers\export_helper.php(3159): writeXmlFromArray(XMLWriter, array("@attributes" => array("type" => "dropdown", "category" => "Simple options", "width" => "12", "title" => "Variations", ...)), "cssframework")
3154                 }
3155 
3156                 if (is_numeric($key)) {
3157                     writeXmlFromArray($xml, $value, $sParentKey);
3158                 } else {
3159                     writeXmlFromArray($xml, $value, $key);
3160                 }
3161 
3162                 if ($bCloseElement === true) {
3163                     $xml->endElement();
3164                     $bCloseElement = false;
#2
+
 C:\laragon\www\limesurvey\application\helpers\export_helper.php(3159): writeXmlFromArray(XMLWriter, array("container" => "on", "zebrastriping" => "off", "stickymatrixheaders" => "off", "greyoutselected" => "off", ...), "options")
3154                 }
3155 
3156                 if (is_numeric($key)) {
3157                     writeXmlFromArray($xml, $value, $sParentKey);
3158                 } else {
3159                     writeXmlFromArray($xml, $value, $key);
3160                 }
3161 
3162                 if ($bCloseElement === true) {
3163                     $xml->endElement();
3164                     $bCloseElement = false;
2024-02-09 15:21:13 Apache/2.4.54 (Win64) OpenSSL/1.1.1q mod_fcgid/2.3.10-dev Yii Framework/1.1.29