Browse Source

ZF-11161
Cast argument #2 to string when calling DOMElement constructor


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23905 44c647ce-9c0f-0410-b52a-842ac1e357ba

adamlundrigan 14 năm trước cách đây
mục cha
commit
a18def8888
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      library/Zend/Log/Formatter/Xml.php

+ 1 - 1
library/Zend/Log/Formatter/Xml.php

@@ -149,7 +149,7 @@ class Zend_Log_Formatter_Xml extends Zend_Log_Formatter_Abstract
             if($key == "message") {
                 $value = htmlspecialchars($value, ENT_COMPAT, $enc);
             }
-            $elt->appendChild(new DOMElement($key, $value));
+            $elt->appendChild(new DOMElement($key, (string)$value));
         }
 
         $xml = $dom->saveXML();