File tree 1 file changed +8
-2
lines changed
lib/aws-sdk/Guzzle/Http/Message
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -879,7 +879,10 @@ public function xml()
879
879
{
880
880
$ errorMessage = null ;
881
881
$ internalErrors = libxml_use_internal_errors (true );
882
- $ disableEntities = libxml_disable_entity_loader (true );
882
+ $ disableEntities = true ;
883
+ if (\PHP_VERSION_ID < 80000 ) {
884
+ $ disableEntities = libxml_disable_entity_loader (true );
885
+ }
883
886
libxml_clear_errors ();
884
887
885
888
try {
@@ -893,7 +896,10 @@ public function xml()
893
896
894
897
libxml_clear_errors ();
895
898
libxml_use_internal_errors ($ internalErrors );
896
- libxml_disable_entity_loader ($ disableEntities );
899
+
900
+ if (\PHP_VERSION_ID < 80000 ) {
901
+ libxml_disable_entity_loader ($ disableEntities );
902
+ }
897
903
898
904
if ($ errorMessage ) {
899
905
throw new RuntimeException ('Unable to parse response body into XML: ' . $ errorMessage );
You can’t perform that action at this time.
0 commit comments