Edit report at https://bugs.php.net/bug.php?id=61469&edit=1
ID: 61469 Updated by: cataphr...@php.net Reported by: saschagros at gmail dot com Summary: simplexml_load_file() url encodes file names if they use a stream wrapper -Status: Open +Status: Not a bug Type: Bug Package: SimpleXML related Operating System: Linux/Windows PHP Version: 5.3.10 Block user comment: N Private report: N New Comment: Looks right. URIs cannot contain spaces. See RFC 3986. Previous Comments: ------------------------------------------------------------------------ [2012-03-21 22:43:03] saschagros at gmail dot com Description: ------------ Drupal uses custom stream wrappers for accessing files. Given the file name "$imported_file = 'temporary://translated file.xlf'", the following does not work: $xml = simplexml_load_file($imported_file); It results in the following warning: simplexml_load_file(): I/O warning : failed to load external entity "temporary://translated%20file.xlf" However, this works just fine: $xml_string = file_get_contents($imported_file); $xml = simplexml_load_string($xml_string); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61469&edit=1