1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

[ticket/10278] Return with a timeout error when fread() or fgets() time out.

PHPBB3-10278
This commit is contained in:
Andreas Fischer
2011-08-25 20:34:01 +02:00
parent 2ffdf56bfe
commit 29a23ae217
2 changed files with 9 additions and 0 deletions

View File

@@ -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);
}