diff options
Diffstat (limited to 'ext/standard/tests')
-rw-r--r-- | ext/standard/tests/streams/bug73457.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/standard/tests/streams/bug73457.phpt b/ext/standard/tests/streams/bug73457.phpt new file mode 100644 index 0000000000..f44c26d8a6 --- /dev/null +++ b/ext/standard/tests/streams/bug73457.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #73457. Wrong error message when fopen FTP wrapped fails to open data connection +--SKIPIF-- +<?php +if (array_search('ftp',stream_get_wrappers()) === FALSE) die("skip ftp wrapper not available."); +if (!function_exists('pcntl_fork')) die("skip pcntl_fork() not available."); +?> +--FILE-- +<?php + +$bug73457=true; +require __DIR__ . "/../../../ftp/tests/server.inc"; + +$path="ftp://127.0.0.1:" . $port."/bug73457"; + +$ds=file_get_contents($path); +var_dump($ds); +?> +==DONE== +--EXPECTF-- +Warning: file_get_contents(ftp://127.0.0.1:%d/bug73457): failed to open stream: Failed to set up data channel: Connection refused in %s on line %d +bool(false) +==DONE== |