File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11ChangeLog
22=========
33
4- 0.4.2 (2015-??-?? )
5- -----------------
4+ 0.4.2 (2015-03-20 )
5+ ------------------
66
77* Removed ` constants.php ` again. They messed with PHPUnit and don't really
88 provide a great benefit.
9+ * #41 : Correctly handle self-closing xml elements.
910
1011
11120.4.1 (2015-03-19)
12- -----------------
13+ ------------------
1314
1415* #40 : An element with an empty namespace (xmlns="") is not allowed to have a
1516 prefix. This is now fixed.
Original file line number Diff line number Diff line change @@ -96,6 +96,9 @@ function xmlSerialize(Writer $writer) {
9696 break ;
9797 }
9898 }
99+ if ($ reader ->isEmptyElement ) {
100+ $ writer ->endElement ();
101+ }
99102 break ;
100103 case Reader::CDATA :
101104 case Reader::TEXT :
Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ function xmlProvider() {
9393 '<foo:element xmlns:foo="http://example.org/ns" xmlns="http://sabredav.org/ns"><child>hello</child></foo:element> ' ,
9494 '<x1:element xmlns:x1="http://example.org/ns"><child>hello</child></x1:element> ' ,
9595 ],
96+ [
97+ '<foo:element xmlns:foo="http://example.org/ns"><child/></foo:element> ' ,
98+ '<foo:element xmlns:foo="http://example.org/ns" xmlns="http://sabredav.org/ns"><child/></foo:element> ' ,
99+ '<x1:element xmlns:x1="http://example.org/ns"><child/></x1:element> ' ,
100+ ],
96101 ];
97102
98103 }
You can’t perform that action at this time.
0 commit comments