Fetch XML file paths from Workbook Relationships

This commit is contained in:
Adrien Loison committed 2017-11-11 15:25:12 +01:00
1 parent 0c8a53c821
commit e2b519d6f9
9 files changed
+226 -33

No files matched your search

+4 -1
View File
@@ -45,7 +45,10 @@ class XMLReader extends \XMLReader
*/
public function getRealPathURIForFileInZip($zipFilePath, $fileInsideZipPath)
{
return (self::ZIP_WRAPPER . realpath($zipFilePath) . '#' . $fileInsideZipPath);
// The file path should not start with a '/', otherwise it won't be found
$fileInsideZipPathWithoutLeadingSlash = ltrim($fileInsideZipPath, '/');
return (self::ZIP_WRAPPER . realpath($zipFilePath) . '#' . $fileInsideZipPathWithoutLeadingSlash);
}
/**