summaryrefslogtreecommitdiff
path: root/ext/ftp/tests
diff options
context:
space:
mode:
authorMitch Hagstrand <mhagstrand@gmail.com>2017-01-08 13:25:46 -0800
committerJoe Watkins <krakjoe@php.net>2017-01-09 00:36:39 +0000
commit47007455dc777aee13c5de9c6751c85c957a5172 (patch)
tree7cc07ede19d7db170e06088a25c102c48f11700e /ext/ftp/tests
parent5b5483dc8e03dfe017868fd398cdd358e7fb1f65 (diff)
downloadphp-git-47007455dc777aee13c5de9c6751c85c957a5172.tar.gz
Fix FTP tests for Travis CI.
This suppresses the errors from stream_socket_server() until server.inc will not make anymore attempts.
Diffstat (limited to 'ext/ftp/tests')
-rw-r--r--ext/ftp/tests/server.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/ftp/tests/server.inc b/ext/ftp/tests/server.inc
index 1a04cd179b..ffef025074 100644
--- a/ext/ftp/tests/server.inc
+++ b/ext/ftp/tests/server.inc
@@ -7,7 +7,7 @@ $context = stream_context_create(array('ssl' => array('local_cert' => dirname(__
for ($i=0; $i<10 && !$socket; ++$i) {
$port = rand(50000, 65535);
- $socket = stream_socket_server("tcp://127.0.0.1:$port", $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
+ @$socket = stream_socket_server("tcp://127.0.0.1:$port", $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
}
//set anther random port that is not the same as $port
do{
@@ -15,6 +15,7 @@ do{
}while($pasv_port == $port);
if (!$socket) {
+ echo "$errstr ($errno)\n";
die("could not start/bind the ftp server\n");
}