diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-08-25 20:34:01 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-08-25 20:34:01 +0200 |
commit | 29a23ae217efed86e6b5afff4c9a0b1271eb20f4 (patch) | |
tree | e265ae2e751a4ad8c4a179ef7c3117ffa02fb7d7 /phpBB/includes/functions_admin.php | |
parent | 2ffdf56bfe8ad35ac648a22a838b1ef01905b2d4 (diff) | |
download | forums-29a23ae217efed86e6b5afff4c9a0b1271eb20f4.tar forums-29a23ae217efed86e6b5afff4c9a0b1271eb20f4.tar.gz forums-29a23ae217efed86e6b5afff4c9a0b1271eb20f4.tar.bz2 forums-29a23ae217efed86e6b5afff4c9a0b1271eb20f4.tar.xz forums-29a23ae217efed86e6b5afff4c9a0b1271eb20f4.zip |
[ticket/10278] Return with a timeout error when fread() or fgets() time out.
PHPBB3-10278
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index ee146ca214..8b9b80b23d 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -3164,6 +3164,14 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port return false; } } + + $stream_meta_data = stream_get_meta_data($fsock); + + if (!empty($stream_meta_data['timed_out'])) + { + $errstr = $user->lang['FSOCK_TIMEOUT']; + return false; + } } @fclose($fsock); } |