Skip to content

Commit 2e3ab22

Browse files
Merge pull request #53 from nextcloud/fix/fail-xml-parse
fix: Fail on XML parse error
2 parents a138631 + 425cd69 commit 2e3ab22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

generate-spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ $phpDocParser = new PhpDocParser($typeParser, $constExprParser);
7171
$infoXMLPath = $dir . "/appinfo/info.xml";
7272

7373
if (file_exists($infoXMLPath)) {
74-
$xml = simplexml_load_file($infoXMLPath);
74+
$xml = simplexml_load_string(file_get_contents($infoXMLPath));
75+
if ($xml === false) {
76+
Logger::panic("appinfo", "info.xml file at " . $infoXMLPath . " is not parsable");
77+
}
7578

7679
$appIsCore = false;
7780
$appID = (string)$xml->id;

0 commit comments

Comments
 (0)