Skip to content

Commit

Permalink
Disable warnings for usage of libxml_disable_entity_loader
Browse files Browse the repository at this point in the history
This function is deprecated in PHP 8 but still works.
  • Loading branch information
Mopolo committed Jan 11, 2021
1 parent cda38dc commit 7197020
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/ServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ public function testDisableEntityLoaderAfterException()
$server->setOptions(['location' => 'test://', 'uri' => 'https://getlaminas.org']);
$server->setReturnResponse(true);
$server->setClass('\LaminasTest\Soap\TestAsset\ServerTestClass');
$loadEntities = libxml_disable_entity_loader(false);
$loadEntities = @libxml_disable_entity_loader(false);

// Doing a request that is guaranteed to cause an exception in Server::_setRequest():
$invalidRequest = '---';
Expand All @@ -1030,9 +1030,9 @@ public function testDisableEntityLoaderAfterException()
$this->assertInstanceOf('\SoapFault', $response);

// The "disable entity loader" setting should be restored to "false" after the exception is raised:
$this->assertFalse(libxml_disable_entity_loader());
$this->assertFalse(@libxml_disable_entity_loader());

// Cleanup; restoring original setting:
libxml_disable_entity_loader($loadEntities);
@libxml_disable_entity_loader($loadEntities);
}
}
2 changes: 1 addition & 1 deletion test/WsdlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ public function testDumpToOutput()
public function checkXMLContent($content)
{
libxml_use_internal_errors(true);
libxml_disable_entity_loader(false);
@libxml_disable_entity_loader(false);
$xml = new \DOMDocument();
$xml->preserveWhiteSpace = false;
$xml->encoding = 'UTF-8';
Expand Down

0 comments on commit 7197020

Please sign in to comment.