From 745401f1c3ef30eb83fce20a731ea7db6554a95d Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Tue, 10 Dec 2024 16:48:17 +0100 Subject: [PATCH] Add supressing errors --- src/Connections/EPPTCPConnection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Connections/EPPTCPConnection.php b/src/Connections/EPPTCPConnection.php index ed7e9b0..dbd4512 100644 --- a/src/Connections/EPPTCPConnection.php +++ b/src/Connections/EPPTCPConnection.php @@ -47,7 +47,7 @@ protected function ensureConnection(): void{ public function close(): bool{ $this->ensureConnection(); - return fclose($this->socket); + return @fclose($this->socket); } /** @@ -61,7 +61,7 @@ public function isClosed(): bool{ public function open(): bool{ $host = $this->registry->getHost(); $hostname = parse_url($host,PHP_URL_SCHEME).'://'.parse_url($host,PHP_URL_HOST); - $this->socket = fsockopen($hostname,$this->registry->getPort(),$errCode,$errMsg,5); + $this->socket = @fsockopen($hostname,$this->registry->getPort(),$errCode,$errMsg,5); return $this->socket!==false; }