load xml as string from local file, fixes #3942
If the entity loader is disabled on a system, loading files, even from the local file system, is considered as external to the running php process, and thus not allowed by the libxml extension. Reading the file contents and loading the xml as a string is a valid alternative however.pull/4100/head
parent
65dd1f7137
commit
b957d1c4a6
|
@ -137,7 +137,7 @@ class PearPackageExtractor
|
|||
private function buildCopyActions($source, array $roles, $vars)
|
||||
{
|
||||
/** @var $package \SimpleXmlElement */
|
||||
$package = simplexml_load_file($this->combine($source, 'package.xml'));
|
||||
$package = simplexml_load_string(file_get_contents($this->combine($source, 'package.xml')));
|
||||
if (false === $package) {
|
||||
throw new \RuntimeException('Package definition file is not valid.');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue