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

tiny alterations

git-svn-id: file:///svn/phpbb/trunk@6846 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-01-06 19:37:09 +00:00
parent 962be6ed09
commit 48b76be50b
4 changed files with 26 additions and 5 deletions

View File

@@ -649,6 +649,9 @@ class fileupload
$filename = $url['path'];
$filesize = 0;
$errno = 0;
$errstr = '';
if (!($fsock = @fsockopen($host, $port, $errno, $errstr)))
{
$file = new fileerror($user->lang[$this->error_prefix . 'NOT_UPLOADED']);
@@ -677,11 +680,11 @@ class fileupload
}
else
{
if (strpos($line, 'Content-Type: ') !== false)
if (stripos($line, 'content-type: ') !== false)
{
$upload_ary['type'] = rtrim(str_replace('Content-Type: ', '', $line));
$upload_ary['type'] = rtrim(str_replace('content-type: ', '', strtolower($line)));
}
else if (strpos($line, '404 Not Found') !== false)
else if (stripos($line, '404 not found') !== false)
{
$file = new fileerror($user->lang[$this->error_prefix . 'URL_NOT_FOUND']);
return $file;