@@ 135-141 (lines=7) @@ | ||
132 | $return = true; |
|
133 | ||
134 | static $xml_is_sane = null; |
|
135 | if ($xml_is_sane === null) |
|
136 | { |
|
137 | $parser_check = xml_parser_create(); |
|
138 | xml_parse_into_struct($parser_check, '<foo>&</foo>', $values); |
|
139 | xml_parser_free($parser_check); |
|
140 | $xml_is_sane = isset($values[0]['value']); |
|
141 | } |
|
142 | ||
143 | // Create the parser |
|
144 | if ($xml_is_sane) |
@@ 1253-1259 (lines=7) @@ | ||
1250 | elseif (!extension_loaded('xmlreader')) |
|
1251 | { |
|
1252 | static $xml_is_sane = null; |
|
1253 | if ($xml_is_sane === null) |
|
1254 | { |
|
1255 | $parser_check = xml_parser_create(); |
|
1256 | xml_parse_into_struct($parser_check, '<foo>&</foo>', $values); |
|
1257 | xml_parser_free($parser_check); |
|
1258 | $xml_is_sane = isset($values[0]['value']); |
|
1259 | } |
|
1260 | if (!$xml_is_sane) |
|
1261 | { |
|
1262 | return false; |