darylldoyle/svg-sanitizer

Standalone scanning of files via CLI throwns Uncaught Error: Class with XPath

Closed this issue · 1 comments

`php ../svg-sanitizer/src/svg-scanner.php "../myTestSVG.svg"

Fatal error: Uncaught Error: Class 'enshrined\svgSanitize\data\XPath' not found in C:\svg-sanitizer\src\Sanitizer.php:214
Stack trace:
#0 C:\svg-sanitizer\src\svg-scanner.php(126): enshrined\svgSanitize\Sanitizer->sanitize('<?xml version="...')
#1 {main}
thrown in C:\svg-sanitizer\src\Sanitizer.php on line 214`

I've used different versions from version 11 to 13.3 and they all produce this error, I have also tried reinstall the package via composer but still receive the same error.

Standalone scanner does not rely on Composer autoload. That's why new .../data/XPath.php needs to be added to the require section as well, see https://github.com/darylldoyle/svg-sanitizer/blob/master/src/svg-scanner.php#L11-L15