Skip to content

Commit

Permalink
Improve path assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Aug 28, 2024
1 parent d52bcb1 commit bfb9328
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Classes/Validation/SaxonXslToSvrlValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,16 @@ public function __construct(array $configuration)
{
parent::__construct(DOMDocument::class);

if (!isset($configuration["jar"]) || !empty(GeneralUtility::getFileAbsFileName($configuration["jar"]))) {
if (!isset($configuration["jar"]) || empty($this->jar = GeneralUtility::getFileAbsFileName($configuration["jar"]))) {
$this->logger->error('Saxon JAR file not found.');
throw new InvalidArgumentException('Saxon JAR file not found.', 1723121212747);
}
if (!isset($configuration["xsl"]) || !empty(GeneralUtility::getFileAbsFileName($configuration["xsl"]))) {
if (!isset($configuration["xsl"]) || empty($this->xsl = GeneralUtility::getFileAbsFileName($configuration["xsl"]))) {
$this->logger->error('XSL Schematron file not found.');
throw new InvalidArgumentException('XSL Schematron file not found.', 1723121212747);
}

$this->jar = $configuration["jar"];
$this->xsl = $configuration["xsl"];
}

protected function isValid($value)
{
$svrl = $this->process($value);
Expand Down

0 comments on commit bfb9328

Please sign in to comment.