From 9dae9a4690e9e5d1b03fa33c7a22bb8390fbb326 Mon Sep 17 00:00:00 2001 From: Arul Date: Thu, 10 Dec 2020 15:41:19 +0800 Subject: [PATCH] Fixes and upgrades behat tests for PHP 8 --- features/bootstrap/RestContext.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/features/bootstrap/RestContext.php b/features/bootstrap/RestContext.php index f372754f5..31579a097 100644 --- a/features/bootstrap/RestContext.php +++ b/features/bootstrap/RestContext.php @@ -373,8 +373,10 @@ public function iRequest($path) break; case 'application/xml': $this->_type = 'xml'; - libxml_use_internal_errors(true); - libxml_disable_entity_loader(true); + @libxml_use_internal_errors(true); + if (\LIBXML_VERSION < 20900) { + libxml_disable_entity_loader(true); + } $this->_data = @simplexml_load_string( $this->_response->getBody(true) );