Skip to content

Commit d4b32e8

Browse files
committed
Enable libxml entity loader test case on Windows
1 parent fce8061 commit d4b32e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/libxml/tests/libxml_disable_entity_loader.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
libxml_disable_entity_loader()
33
--SKIPIF--
4-
<?php if (!extension_loaded('libxml') || !extension_loaded('dom') || defined('PHP_WINDOWS_VERSION_MAJOR')) die('skip'); ?>
4+
<?php if (!extension_loaded('libxml') || !extension_loaded('dom')) die('skip'); ?>
55
--FILE--
66
<?php
77

@@ -11,7 +11,8 @@ $xml = <<<EOT
1111
<foo>&xxe;</foo>
1212
EOT;
1313

14-
$xml = str_replace('XXE_URI', __DIR__ . '/libxml_disable_entity_loader_payload.txt', $xml);
14+
$dir = str_replace('\\', '/', __DIR__);
15+
$xml = str_replace('XXE_URI', $dir . '/libxml_disable_entity_loader_payload.txt', $xml);
1516

1617
function parseXML($xml) {
1718
$doc = new DOMDocument();

0 commit comments

Comments
 (0)