mirror of
https://github.com/friendica/friendica
synced 2024-11-19 13:43:40 +00:00
Coding standards
This commit is contained in:
parent
2c6db3ccac
commit
684f9cdb96
1 changed files with 6 additions and 6 deletions
|
@ -159,9 +159,9 @@ class HTTPInputData
|
||||||
if ($fileHandle === false) {
|
if ($fileHandle === false) {
|
||||||
$error = UPLOAD_ERR_CANT_WRITE;
|
$error = UPLOAD_ERR_CANT_WRITE;
|
||||||
} else {
|
} else {
|
||||||
$lastLine = NULL;
|
$lastLine = null;
|
||||||
while (($chunk = fgets($stream, 8096)) !== false && strpos($chunk, $boundary) !== 0) {
|
while (($chunk = fgets($stream, 8096)) !== false && strpos($chunk, $boundary) !== 0) {
|
||||||
if ($lastLine !== NULL) {
|
if ($lastLine !== null) {
|
||||||
if (fwrite($fileHandle, $lastLine) === false) {
|
if (fwrite($fileHandle, $lastLine) === false) {
|
||||||
$error = UPLOAD_ERR_CANT_WRITE;
|
$error = UPLOAD_ERR_CANT_WRITE;
|
||||||
break;
|
break;
|
||||||
|
@ -170,7 +170,7 @@ class HTTPInputData
|
||||||
$lastLine = $chunk;
|
$lastLine = $chunk;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($lastLine !== NULL && $error !== UPLOAD_ERR_CANT_WRITE) {
|
if ($lastLine !== null && $error !== UPLOAD_ERR_CANT_WRITE) {
|
||||||
if (fwrite($fileHandle, rtrim($lastLine, "\r\n")) === false) {
|
if (fwrite($fileHandle, rtrim($lastLine, "\r\n")) === false) {
|
||||||
$error = UPLOAD_ERR_CANT_WRITE;
|
$error = UPLOAD_ERR_CANT_WRITE;
|
||||||
}
|
}
|
||||||
|
@ -189,17 +189,17 @@ class HTTPInputData
|
||||||
private static function fetchVariables($stream, string $boundary, string $name, array $variables)
|
private static function fetchVariables($stream, string $boundary, string $name, array $variables)
|
||||||
{
|
{
|
||||||
$fullValue = '';
|
$fullValue = '';
|
||||||
$lastLine = NULL;
|
$lastLine = null;
|
||||||
|
|
||||||
while (($chunk = fgets($stream)) !== false && strpos($chunk, $boundary) !== 0) {
|
while (($chunk = fgets($stream)) !== false && strpos($chunk, $boundary) !== 0) {
|
||||||
if ($lastLine !== NULL) {
|
if ($lastLine !== null) {
|
||||||
$fullValue .= $lastLine;
|
$fullValue .= $lastLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
$lastLine = $chunk;
|
$lastLine = $chunk;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($lastLine !== NULL) {
|
if ($lastLine !== null) {
|
||||||
$fullValue .= rtrim($lastLine, "\r\n");
|
$fullValue .= rtrim($lastLine, "\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue