summaryrefslogtreecommitdiff
path: root/app/Report/ReportParserBase.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2021-09-23 16:26:48 +0100
committerGreg Roach <greg@subaqua.co.uk>2021-09-23 16:26:48 +0100
commit6d66a8ecc0f9e1cbe6d48547497df5d2c368439f (patch)
tree9c14a242f8546b29549f813d80a6b023612a1b3d /app/Report/ReportParserBase.php
parent1a9891fd362605f28f9778a26f6d804cab13f573 (diff)
downloadwebtrees-6d66a8ecc0f9e1cbe6d48547497df5d2c368439f.tar.gz
webtrees-6d66a8ecc0f9e1cbe6d48547497df5d2c368439f.tar.bz2
webtrees-6d66a8ecc0f9e1cbe6d48547497df5d2c368439f.zip
Use flysystem instead of direct file access
Diffstat (limited to 'app/Report/ReportParserBase.php')
-rw-r--r--app/Report/ReportParserBase.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/Report/ReportParserBase.php b/app/Report/ReportParserBase.php
index 7d1cad5b61..2c16467f11 100644
--- a/app/Report/ReportParserBase.php
+++ b/app/Report/ReportParserBase.php
@@ -21,6 +21,7 @@ namespace Fisharebest\Webtrees\Report;
use DomainException;
use Exception;
+use Fisharebest\Webtrees\Registry;
use XMLParser;
use function call_user_func;
@@ -83,11 +84,7 @@ class ReportParserBase
}
);
- $fp = fopen($report, 'rb');
-
- if ($fp === false) {
- throw new Exception('Cannot open ' . $report);
- }
+ $fp = Registry::filesystem()->root()->readStream($report);
while ($data = fread($fp, 4096)) {
if (!xml_parse($this->xml_parser, $data, feof($fp))) {