File tree 2 files changed +9
-9
lines changed
DependencyInjection/Loader
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -634,10 +634,10 @@ public function validateSchema(\DOMDocument $dom)
634
634
EOF
635
635
;
636
636
637
- if (\LIBXML_VERSION < 20900 ) {
638
- $ disableEntities = libxml_disable_entity_loader (false );
637
+ if (\PHP_VERSION_ID < 90000 ) {
638
+ $ disableEntities = @ libxml_disable_entity_loader (false );
639
639
$ valid = @$ dom ->schemaValidateSource ($ source );
640
- libxml_disable_entity_loader ($ disableEntities );
640
+ @ libxml_disable_entity_loader ($ disableEntities );
641
641
} else {
642
642
$ valid = @$ dom ->schemaValidateSource ($ source );
643
643
}
Original file line number Diff line number Diff line change @@ -61,21 +61,21 @@ public static function validateSchema(\DOMDocument $dom): array
61
61
{
62
62
$ xliffVersion = static ::getVersionNumber ($ dom );
63
63
$ internalErrors = libxml_use_internal_errors (true );
64
- if (\LIBXML_VERSION < 20900 ) {
65
- $ disableEntities = libxml_disable_entity_loader (false );
64
+ if (\PHP_VERSION_ID < 90000 ) {
65
+ $ disableEntities = @ libxml_disable_entity_loader (false );
66
66
}
67
67
68
68
$ isValid = @$ dom ->schemaValidateSource (self ::getSchema ($ xliffVersion ));
69
69
if (!$ isValid ) {
70
- if (\LIBXML_VERSION < 20900 ) {
71
- libxml_disable_entity_loader ($ disableEntities );
70
+ if (\PHP_VERSION_ID < 90000 ) {
71
+ @ libxml_disable_entity_loader ($ disableEntities );
72
72
}
73
73
74
74
return self ::getXmlErrors ($ internalErrors );
75
75
}
76
76
77
- if (\LIBXML_VERSION < 20900 ) {
78
- libxml_disable_entity_loader ($ disableEntities );
77
+ if (\PHP_VERSION_ID < 90000 ) {
78
+ @ libxml_disable_entity_loader ($ disableEntities );
79
79
}
80
80
81
81
$ dom ->normalizeDocument ();
You can’t perform that action at this time.
0 commit comments