Author: FabianLange
Date: 2010-01-22 18:08:04 +0100 (Fri, 22 Jan 2010)
New Revision: 27061
Modified:
branches/1.3/lib/test/sfTesterResponse.class.php
branches/1.4/lib/test/sfTesterResponse.class.php
Log:
[1.3, 1.4] partially fixed sfTester#isValid() on Windows systems (closes #7812)
Modified: branches/1.3/lib/test/sfTesterResponse.class.php
===================================================================
--- branches/1.3/lib/test/sfTesterResponse.class.php 2010-01-22 16:33:46 UTC
(rev 27060)
+++ branches/1.3/lib/test/sfTesterResponse.class.php 2010-01-22 17:08:04 UTC
(rev 27061)
@@ -183,7 +183,21 @@
if (true === $checkDTD)
{
$cache = sfConfig::get('sf_cache_dir').'/sf_tester_response/w3';
- $local = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', $cache);
+ if ($cache[1] == ':')
+ {
+ // On Windows systems the path will be like c:\symfony\cache\xml.dtd
+ // I did not manage to get DOMDocument loading a file protocol url
including the drive letter
+ // file://c:\symfony\cache\xml.dtd or file://c:/symfony/cache/xml.dtd
+ // The first one simply doesnt work, the second one is treated as
remote call.
+ // However the following works. Unfortunatly this means we can only
access the current disk
+ // file:///symfony/cache/xml.dtd
+ // Note that all work for file_get_contents so the bug is most
likely in DOMDocument.
+ $local = 'file://'.substr(str_replace(DIRECTORY_SEPARATOR, '/',
$cache), 2);
+ }
+ else
+ {
+ $local = 'file://'.$cache;
+ }
if (!file_exists($cache.'/TR/xhtml11/DTD/xhtml11.dtd'))
{
Modified: branches/1.4/lib/test/sfTesterResponse.class.php
===================================================================
--- branches/1.4/lib/test/sfTesterResponse.class.php 2010-01-22 16:33:46 UTC
(rev 27060)
+++ branches/1.4/lib/test/sfTesterResponse.class.php 2010-01-22 17:08:04 UTC
(rev 27061)
@@ -183,7 +183,21 @@
if (true === $checkDTD)
{
$cache = sfConfig::get('sf_cache_dir').'/sf_tester_response/w3';
- $local = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', $cache);
+ if ($cache[1] == ':')
+ {
+ // On Windows systems the path will be like c:\symfony\cache\xml.dtd
+ // I did not manage to get DOMDocument loading a file protocol url
including the drive letter
+ // file://c:\symfony\cache\xml.dtd or file://c:/symfony/cache/xml.dtd
+ // The first one simply doesnt work, the second one is treated as
remote call.
+ // However the following works. Unfortunatly this means we can only
access the current disk
+ // file:///symfony/cache/xml.dtd
+ // Note that all work for file_get_contents so the bug is most
likely in DOMDocument.
+ $local = 'file://'.substr(str_replace(DIRECTORY_SEPARATOR, '/',
$cache), 2);
+ }
+ else
+ {
+ $local = 'file://'.$cache;
+ }
if (!file_exists($cache.'/TR/xhtml11/DTD/xhtml11.dtd'))
{
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.