[-] CORE : No Exception when CONTENT_LENGTH is no set
This commit is contained in:
@@ -248,9 +248,13 @@ class QqUploadedFileXhr
|
|||||||
|
|
||||||
public function getSize()
|
public function getSize()
|
||||||
{
|
{
|
||||||
if (isset($_SERVER['CONTENT_LENGTH']))
|
if (isset($_SERVER['CONTENT_LENGTH']) || isset($_SERVER['HTTP_CONTENT_LENGTH']))
|
||||||
return (int)$_SERVER['CONTENT_LENGTH'];
|
{
|
||||||
else
|
if (isset($_SERVER['HTTP_CONTENT_LENGTH']))
|
||||||
throw new Exception('Getting content length is not supported.');
|
return (int)$_SERVER['HTTP_CONTENT_LENGTH'];
|
||||||
|
else
|
||||||
|
return (int)$_SERVER['CONTENT_LENGTH'];
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user