Skip to content

Commit 06e7b1c

Browse files
committed
fixed issue "Fatal error: Class 'HTML5_Tokenizer' not found " when enable_html5parser option enabled
1 parent 5fb5be5 commit 06e7b1c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/DOMPDFModule/Service/DOMPDFFactory.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ public function createService(ServiceLocatorInterface $serviceLocator)
107107

108108
define(static::$configCompatMapping[$key], $value);
109109
}
110-
110+
111+
if ($config['enable_html5parser']) {
112+
require_once DOMPDF_LIB_DIR . '/html5lib/Parser.php';
113+
}
114+
111115
require_once DOMPDF_INC_DIR . '/functions.inc.php';
112116
require_once __DIR__ . '/../../../config/module.compat.php';
113117

0 commit comments

Comments
 (0)