xref: /PHP-7.2/ext/ftp/tests/bug37799.phpt (revision 9d71d653)
1--TEST--
2Bug #37799 (ftp_ssl_connect() falls back to non-ssl connection)
3--SKIPIF--
4<?php
5$ssl = 1;
6require 'skipif.inc';
7if (!function_exists("ftp_ssl_connect")) die("skip ftp_ssl is disabled");
8?>
9--FILE--
10<?php
11$bug37799=$ssl=1;
12require 'server.inc';
13
14$ftp = ftp_ssl_connect('127.0.0.1', $port);
15if (!$ftp) die("Couldn't connect to the server");
16
17var_dump(ftp_login($ftp, 'user', 'pass'));
18
19ftp_close($ftp);
20?>
21--EXPECTF--
22Warning: ftp_login(): %rdummy|bogus msg%r in %sbug37799.php on line 8
23bool(false)
24