mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10278] Return with a timeout error when fread() or fgets() time out.
PHPBB3-10278
This commit is contained in:
parent
2ffdf56bfe
commit
29a23ae217
2 changed files with 9 additions and 0 deletions
|
@ -3164,6 +3164,14 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
||||||
return false;
|
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);
|
@fclose($fsock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,6 +200,7 @@ $lang = array_merge($lang, array(
|
||||||
'FORUM_RULES_LINK' => 'Please click here to view the forum rules',
|
'FORUM_RULES_LINK' => 'Please click here to view the forum rules',
|
||||||
'FROM' => 'from',
|
'FROM' => 'from',
|
||||||
'FSOCK_DISABLED' => 'The operation could not be completed because the <var>fsockopen</var> function has been disabled or the server being queried could not be found.',
|
'FSOCK_DISABLED' => 'The operation could not be completed because the <var>fsockopen</var> function has been disabled or the server being queried could not be found.',
|
||||||
|
'FSOCK_TIMEOUT' => 'A timeout occurred while reading from the network stream.',
|
||||||
|
|
||||||
'FTP_FSOCK_HOST' => 'FTP host',
|
'FTP_FSOCK_HOST' => 'FTP host',
|
||||||
'FTP_FSOCK_HOST_EXPLAIN' => 'FTP server used to connect your site.',
|
'FTP_FSOCK_HOST_EXPLAIN' => 'FTP server used to connect your site.',
|
||||||
|
|
Loading…
Add table
Reference in a new issue