Prevented fsockopen() from throwing a warning if host is unreachable
authorAlexander Ebert <ebert@woltlab.com>
Sun, 7 Jul 2013 21:56:23 +0000 (23:56 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 7 Jul 2013 21:56:23 +0000 (23:56 +0200)
wcfsetup/install/files/lib/system/io/RemoteFile.class.php

index d73c611d2f7393ae3f0171052f8361a90b26a3e5..391fbd7a697dcfad46b36ce8c07cf9e96bf832e3 100644 (file)
@@ -49,7 +49,7 @@ class RemoteFile extends File {
                $this->host = $host;
                $this->port = $port;
                
-               $this->resource = fsockopen($host, $port, $this->errorNumber, $this->errorDesc, $timeout);
+               $this->resource = @fsockopen($host, $port, $this->errorNumber, $this->errorDesc, $timeout);
                if ($this->resource === false) {
                        throw new SystemException('Can not connect to ' . $host, 0, $this->errorDesc);
                }